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
JustinDoh1
Post Prodigy
Post Prodigy

How to pass filter value into a variable?

I have using measure that has all static value for filter values (in this case: FacilityCode).

Bottom is just one example of a measure.

 

JustinDoh1_0-1709078665584.png

 

Now, I came across the point, this approach is not possible because I need to use Filter/Slicer to put the value here using Variable possibly (yellow area) - dynamic approach.

 

How do I go about doing it?

 

Do I create another measure for the value of Filter and plug here?

 

 

 

1 ACCEPTED SOLUTION

remove the curly brackets

View solution in original post

4 REPLIES 4
vicky_
Super User
Super User

replace the yellow part with VALUES(SlicerTable[SlicerField])

@vicky_  Thank you so much for your help.

I am getting this error:

JustinDoh1_2-1709166456457.png

I was modifying code here:

JustinDoh1_3-1709166524440.png

 

 

remove the curly brackets

lbendlin
Super User
Super User

read about VALUES() and about FILTERS()

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

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.