web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / LookUp for Columns?
Power Apps
Unanswered

LookUp for Columns?

(1) ShareShare
ReportReport
Posted on by 10

 

Hi,

 

I'm most likely going about this the wrong way... but here goes:

Is there a way to select a column in a table based on a criteria and use this in a lookup formula?

 

I have a Table set ut as shown below, and I use a LookUp formula to select the appropriate record for my app.  The Columns named '100', '200',... etc represent the material properties of the material for a given temperature i.e. 100 F, 200 F, etc.

 

Referencing a field using LookUp is fairly easy when the column name is known. for example:

LookUp(Table; Material = MatrDropdown.Selected.Value; '100')

 

but....I want to grab the temperature from an TextInput box (TempBox) and when I try to parse it into the lookup formula it no longer returns the field from the table but the actual input from the textinput box.

 

Here's what I've tried:

 

LookUp(Table; Material = MatrDropdown.Selected.Value; Value(TempBox.Text))

 

I.e. if I put 100 as value in the textinputbox, then the value 100 is returned and not the referenced to the field in Table.'100' that corresponds to the selected material. I've tried adding "" or '' to the value, or simly renaming the columns to XXX, YYY, ZZZ etc but the same problem persists. Is there another/better way to reference a column in a table?

 

 

Material100200300400500600
CS- A106 B / API 5L B20,0020,0020,0020,0018,9017,30
CS- A333 Gr.620,0020,0020,0020,0018,9017,30
CS- A671 C60/ A672 CC6020,0019,5018,9018,7017,3015,80
CS- API 5L X5222,0022,0022,0022,000,000,00
CS- A671 C7023,3023,1022,5021,7020,5018,70

 

 

Kind Regards

-Bjørn

Categories:
  • hpkeong Profile Picture
    2,944 on at

    Hi

     

    After reading, I would suggest you re-tabulae it by tranposing them.

     

    Material_Temp    CS-1   CS-2   CS03

    100

    200

    300

     

    Then You should be able to get what you want.

     

    Just edit to insert a photo for referece.

     

    Screenshot (150).png

     

     

    Hope I am right.

     

    TQ

     

     

  • bjnil Profile Picture
    10 on at

    Hi,

     

    I have not tried this yet.... but at first glance....won't the problem be the same; only transposed?

     

    How can you extract the value for a given material from the resulting record? 😃

     

  • BVora Profile Picture
    6 on at

    I am also facing this issue.

     

    So what we need is an equivalent to Index formula which can search both Rows and Columns. Please let us know if there is any workaround for this problem.

  • BVora Profile Picture
    6 on at

    I found the workaround. 

     

    You need to put the data into the three columns as shown Below. Then in the lookup formula in the powerapps write this: LookUp(Table, Material = MatrDropdown.Selected.Value && Temp=TempBox.Text,Temperature).

     

    Please let us know if there is a better way to achieve this.

     

    MaterialTempTemperature

    CS- A106 B / API 5L B

    10020
    CS- A333 Gr.610020
    CS- A671 C60/ A672 CC6010020
    CS- API 5L X5210022
    CS- A671 C7010023.3

    CS- A106 B / API 5L B

    20020
    CS- A333 Gr.620020
    CS- A671 C60/ A672 CC6020019.5
    CS- API 5L X5220022
    CS- A671 C7020023.1

    CS- A106 B / API 5L B

    30020
    CS- A333 Gr.630020
    CS- A671 C60/ A672 CC6030018.9
    CS- API 5L X5230022
    CS- A671 C7030022.5
  • bjnil Profile Picture
    10 on at

    Hehe.... I managed to reach the same conclusion. Will try it out and report back.

  • bjnil Profile Picture
    10 on at

    Yes, I can confirm that the solution works. It's a bit of a hazzle to rearrange the input data but it works.

     

    In order to sort out the duplicate selections for the material dropdown I added a simple Filter(B313Data;Temperature = 100).

     

    If I can figure out a better way I'll let you know. Thanks!

  • hpkeong Profile Picture
    2,944 on at

    Hi @bjnil

     

    In fact, what you presented in 3-Columns is the correct Tabluation for Database and the first one was Excel style.

    I thought you wish to create a Matrix-Style table.

     

    Anyway, glad that you had sorted it out.

    Here is another workaround which is based on your MATRIX style data, though not prefered as normal databouse in making apps.

     

    Matrix Styled Data solutionMatrix Styled Data solution

     

    Hope this helps you if you wish this style.

    Have a nice day.

    G9 from HCMC.

  • bjnil Profile Picture
    10 on at

    Thanks for the help!

     

    I have not yet had a chance to try out the matrix solution but the first solution works fine! 😃

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 258

#3
Mohsin Ali Profile Picture

Mohsin Ali 231

Last 30 days Overall leaderboard