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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
addd123
Frequent Visitor

Dynamic LOOKUPVALUE

Im trying to look up a specfic value in a table. Which i then want to implement in a chart. 

 

The trick is i want this look up to be dynamic according to a slicer/selection in the report. 

 

My first idea was the LOOKUPVALUE function. Is there a way to adjust the <result_columnName> and the <search_columName> according to a selection in a slicer?

 

 

LOOKUPVALUE( <result_columnName>, <search_columnName>, <search_value>[, <search_columnName>, <search_value>]…)

 

 

Thanks!

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

Hi @addd123,

 

Firstly, I would suggest you take a look at this article to know how use LookupValue() function: LOOKUPVALUE Function (DAX). From the article, we can know that both result_columnName and search_columnName parameters cannot be an expression. It means that we are not able to search dynamic column and return dynamic column matched value.

 

In your scenario, if you want to lookup different columns use one LookupValue() expression, I'm afraid it can't be achieved currently. You need to specify many expressions to search separate column and return matched value for a specified column.

 

But if you want to filter data returned from the LookupValue() function based on checked value from the slicer, you can create a LookupValue() expression, and drag related field to slicer, value returned by LookupValue() function can be filtered dynamically. See:

 

AlltheDataAlltheDatasummarysummary

w3.PNGw4.PNG

 

You can take a look at attached .PBIX file.

 

If you have any question, please feel free to ask.

 

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 @addd123,

 

Firstly, I would suggest you take a look at this article to know how use LookupValue() function: LOOKUPVALUE Function (DAX). From the article, we can know that both result_columnName and search_columnName parameters cannot be an expression. It means that we are not able to search dynamic column and return dynamic column matched value.

 

In your scenario, if you want to lookup different columns use one LookupValue() expression, I'm afraid it can't be achieved currently. You need to specify many expressions to search separate column and return matched value for a specified column.

 

But if you want to filter data returned from the LookupValue() function based on checked value from the slicer, you can create a LookupValue() expression, and drag related field to slicer, value returned by LookupValue() function can be filtered dynamically. See:

 

AlltheDataAlltheDatasummarysummary

w3.PNGw4.PNG

 

You can take a look at attached .PBIX file.

 

If you have any question, please feel free to ask.

 

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.