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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Connecting LOOKUPVALUE Function with dynamic Input-Variable

Hello Power-Bi-Community,

 

After being tired using Think-Cell for my graphics, I wanted to try Power BI for my use case. Therefore I am pretty new to this topic.

 

I got a table with serval different types of vehicles, e.g. "passenger car", "truck", "bus" etc. The User of the graphics is able to plot different figures by using a slicer and choosing between those types of vehicles.

I want to catch specific Values using the LOOKUPVALUE function to fill a new created table2:

 

LOOKUPVALUE(Table1[Price],Table1[Vehicle], x)

 

The problem I am running into is, the x should be dynamic - e.g. if the user choosed "passenger car" using the slicer, x should be "passenger car" too. So I used the SELECTEDVALUE function to catch what ever vehicle types is choosed by the User:

 

LOOKUPVALUE(Table1[Price],Table1[Vehicle], SELECTEDVALUE(Table1[Vehicle])

 

But unfortunalety this is not working fine. When ever I am using the function above as a messuare, I get the right value back, but as soon as I insert the function to the new table, I just got a blank cell. Why does the messuare work, but filling in in a new table doesn't?

 

Do you have any ideas for a proper solution?

 

Thanks Leo

1 REPLY 1
v-jianboli-msft
Community Support
Community Support

Hi @Anonymous ,

 

It sounds like you are trying to use the LOOKUPVALUE function in a measure that applied in a table visual, and you want the value of the lookup to be based on the selected value of a slicer.

If the field in table visual are related with Table1[Vehicle], the selectedvalue function may not reflect the value you selected in the slicer. Please try to create a new table for slicer, such as SlicerTable[Vehicle], and use 

LOOKUPVALUE(Table1[Price],Table1[Vehicle], SELECTEDVALUE(SlicerTable[Vehicle])

 

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.