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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
AyubSherif
Frequent Visitor

Performance of Lookupvalue and Alternatives

I have a Master Data table and a Key table, and I need to look up 13 columns from the master data in the key table.

Master Data:

ProjectIDValue1Value2Value3
1ACA
2BBC

Key Table:

ValueScore
A100
B90
C80

 

I have the two tables separate and created a measure for each column I need to look up:

 

Value1_Lookup = LOOKUPVALUE('Key Table'[Score],'Key Table'[Value],SELECTEDVALUE('Master Data'[value 1]))

 

But I am concerned about performance. Is there a better way to do this? I tried the same measure with a Switch function instead of  lookupvalue, but the performance is not much better. Does creating calculated columns into my Master Data a better option here?

Notes, my key table only has 5 values

2 ACCEPTED SOLUTIONS
Greg_Deckler
Super User
Super User

@AyubSherif Perhaps do a Merge query step in Power Query?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

TomasAndersson
Solution Sage
Solution Sage

Hi!

You can read more about LOOKUPVALUE() and some performance considerations with alternatives here: https://dax.guide/lookupvalue/

Calculated columns are quick as they are calculated on beforehand, when the model is loaded. For the same reason however the model also becomes bigger with calculated columns, so it depends on where your main concerns are. 

View solution in original post

2 REPLIES 2
TomasAndersson
Solution Sage
Solution Sage

Hi!

You can read more about LOOKUPVALUE() and some performance considerations with alternatives here: https://dax.guide/lookupvalue/

Calculated columns are quick as they are calculated on beforehand, when the model is loaded. For the same reason however the model also becomes bigger with calculated columns, so it depends on where your main concerns are. 

Greg_Deckler
Super User
Super User

@AyubSherif Perhaps do a Merge query step in Power Query?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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