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 With Two Condit...
Power Apps
Unanswered

Lookup With Two Conditions

(0) ShareShare
ReportReport
Posted on by 1,265

I have the following as the Default property of a field in a Power App.

If(!IsBlank(DataCardValue102.Selected),LookUp(ShopRateInfo,CraftSR = DataCardValue102.Selected.CraftSR).CraftRate)

 

The format works properly until I add the portion underlined below.

If(!IsBlank(DataCardValue102.Selected),LookUp(ShopRateInfo,CraftSR = DataCardValue102.Selected.CraftSR && FiscalYear = Text(DataCardValue2)).CraftRate)

 

Essentially I want to lookup up a value in SP List "ShopRateInfo" when there is a match as follows...

 

Any suggestions how to address?

 

Categories:
I have the same question (0)
  • Hassan_SZ_365 Profile Picture
    542 on at

    Hi @RJF61 ,

     

    Use this formula:

     

    If(
     !IsBlank(DataCardValue102.Selected),
     LookUp(
     ShopRateInfo, 
     CraftSR = DataCardValue102.Selected.CraftSR && FiscalYear = Text(DataCardValue2.Text)
     ).CraftRate
    )

     

    Key Points:

    • Make sure CraftSR and FiscalYear are the correct internal names of the fields in the "ShopRateInfo" SharePoint list.
    • DataCardValue102.Selected.CraftSR should correctly refer to the selected item's CraftSR property from DataCardValue102.
    • Text(DataCardValue2.Text) should be changed to match the exact property of DataCardValue2 that holds the Fiscal Year. If DataCardValue2 is a Text Input control, DataCardValue2.Text is correct. If it's a different type of control (like a DatePicker), you'll need to adjust the formula to reference the correct property for the Fiscal Year.

    This formula will perform a lookup in the "ShopRateInfo" list where both the CraftSR and FiscalYear conditions are met and return the CraftRate for the matched item.

  • RJF61 Profile Picture
    1,265 on at

    Hi @Hassan_SZ_365 So that did work; however, I have one more field column that did function properly.  In this case CraftSR in ShopRateInfo is "SUPV".  I want to pull the value where CraftSR = "SUPV" and FiscalYear = 2023.

     

    LookUp(ShopRateInfo,CraftSR = "SUPV" && FiscalYear = Text(DataCardValue2.Text)).CraftRate

     

    I am receiving...

    RJF61_0-1701204316311.png

     

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard