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 question with m...
Power Apps
Answered

Lookup question with multiple conditions

(0) ShareShare
ReportReport
Posted on by 3,284

Hi there.

 

I hope someone could point me in the right direction:

 

I can't figure out this lookup formula. I need to retrieve a value based in a couple of conditions.

 

In my gallery I have my customer, customer location and level based in that I need to see in a label the percentage associated with the customer.

 

the data to retrieve is stored in a collection

 

Please see the below chart:

 

sajarac_0-1617221202131.png

 

So for the parts label located outside of the gallery is:

 

a lookup condition that checks the BrowseGallery.Selected and check the Collection and like in this case if the customer is in Canada and the level = 2 for parts the values to retrieve = 8.3%

 

Any help please? 

 

And thanks in advance

 

 

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    154,943 Most Valuable Professional on at

    Hi @sajarac ,

    The problem you have is that you cannot refer to a column (Canada) dynamically - you would have to hard-code that. What exactly is being selected from the drop-down (what is the Items property)

  • Sajarac Profile Picture
    3,284 on at

    Hi, thank you very much for your prompt response. I don't have a dropdown the data there is just a representation on how the Collection looks like. 

     

    And the gallery is an standard gallery when you create an app from a share point list. 

     

     

    regards

  • WarrenBelz Profile Picture
    154,943 Most Valuable Professional on at

    Hi @sajarac ,

    Can you please give me (example lists if you like) the Column names of both lists, the list names and the Items of the drop-down.

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @sajarac,

    Do you want to populate the Label based on Gallery selected and retrieve value from the collection?

    Could you please share a bit more about the scenario?

    Set the Text property of the Parts Label as below:

    If(BrowseGallery.Selected.CustomerLocation="Canada",
     LookUP(Collection,Level=BrowseGallery.Selected.Level && Items="Parts").Canada,
     If(BrowseGallery.Selected.CustomerLocation="USA",
     LookUP(Collection,Level=BrowseGallery.Selected.Level&& Items="Parts").USA,
     LookUP(Collection,Level=BrowseGallery.Selected.Level&& Items="Parts").Others
     )
     )
    

    Set the Text property of the Services Label as below:

    If(BrowseGallery.Selected.CustomerLocation="Canada",
     LookUP(Collection,Level=BrowseGallery.Selected.Level && Items="Services").Canada,
    If(BrowseGallery.Selected.CustomerLocation="USA",
     LookUP(Collection,Level=BrowseGallery.Selected.Level&& Items="Services").USA,
     LookUP(Collection,Level=BrowseGallery.Selected.Level&& Items="Services").Others
     )
     )
    

    Hope it could help.

    Regards,

    Qi

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard