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
SalmoS
Frequent Visitor

Simple question regarding LOOKUP function

Hi everyone

 

Pretty new Power BI user here as my question probably reveals.

 

I am wondering if you need to be cautious to sort your data before using the lookup function?

 

My reason for asking is that I have some experience in using this function in excel, and if your reference table is not properly sorted (a-z, or lowest-highest), it might return the wrong data back. In excel I´ve fixed this by using index functions instead, which has worked very well.

 

My DAX formula is seemingly working fine, but I suddenly remembered having issues with this in excel (even though at first glance it seemed to function, some of the feedback values were wrong because the table had not been properly sorted)

 

Thank you for your help!

1 ACCEPTED SOLUTION
v-qiuyu-msft
Community Support
Community Support

Hi @SalmoS,

 

In Power BI, there is a DAX function LOOKUPVALUE() for us to lookup desired results. It doesn't require data to be sorted. 

 

You can learn more about this function via below links: 

 

https://www.c-sharpcorner.com/article/dax-in-power-bi-how-to-use-lookupvalue-function/

https://www.sqlbi.com/articles/lookup-multiple-values-in-dax/

 

Best Regards,
Qiuyun Yu 

 

 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-qiuyu-msft
Community Support
Community Support

Hi @SalmoS,

 

In Power BI, there is a DAX function LOOKUPVALUE() for us to lookup desired results. It doesn't require data to be sorted. 

 

You can learn more about this function via below links: 

 

https://www.c-sharpcorner.com/article/dax-in-power-bi-how-to-use-lookupvalue-function/

https://www.sqlbi.com/articles/lookup-multiple-values-in-dax/

 

Best Regards,
Qiuyun Yu 

 

 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.