Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
jas_power
Helper I
Helper I

Calculated Column - Lookup Value in Same Table Based on Multiple Conditions

I have a table where I need to create a calulated column to determine the value from the main product for each row.

 

jas_power_0-1668430471050.png

 

I want to lookup the value when the geoId and refPer matches and the prodId = 2. So for each product id in the table, I want to show the value for prodId 2 for the same refPer and geoId.

 

jas_power_1-1668431749339.png

 

1 ACCEPTED SOLUTION
jas_power
Helper I
Helper I

Based on the response by @MG86  in this thread (Solved: LookupValue with Filter - Microsoft Power BI Community) I added a calculated column that did the trick.

 

value2 = LOOKUPVALUE(I_data[value], I_data[geoId], I_data[geoId], I_data[refPer], I_data[refPer], I_data[prodId], 2)

 

Thank you @MG86 for such an elegant solution.

View solution in original post

1 REPLY 1
jas_power
Helper I
Helper I

Based on the response by @MG86  in this thread (Solved: LookupValue with Filter - Microsoft Power BI Community) I added a calculated column that did the trick.

 

value2 = LOOKUPVALUE(I_data[value], I_data[geoId], I_data[geoId], I_data[refPer], I_data[refPer], I_data[prodId], 2)

 

Thank you @MG86 for such an elegant solution.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.