cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Fetch value from slicer

I would like to use the value from a slicer dropdown and use it for conditional formatting. Let's say a user has selected 100 in the dropdown. Then all values in a certain column should be green if they are above 100. The slicer is connected to a simple table with no connections in the model, just a range of numbers really.

 

Is this possible?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Fetch value from slicer

Hi matt_s

You could try below measure

 IF(SELECTEDVALUE(slicer[v])<=SELECTEDVALUE('Table'[amount]),"#2AC9C9","#C6CC1F")

Then use this measure to define conditional format like below

240.PNG

Best Regards,
Zoe Zhi

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

2 REPLIES 2
Highlighted
Frequent Visitor

Re: Fetch value from slicer

One step further, I have managed to get this into a measure and to return either 0 or 1. But the measure is not available to choose as a field in the conditional formatting rules?

 

NewMeasure = IF(SELECTEDVALUE(Slicer) < Table[Field]);"1";"0")
Highlighted
Community Support
Community Support

Re: Fetch value from slicer

Hi matt_s

You could try below measure

 IF(SELECTEDVALUE(slicer[v])<=SELECTEDVALUE('Table'[amount]),"#2AC9C9","#C6CC1F")

Then use this measure to define conditional format like below

240.PNG

Best Regards,
Zoe Zhi

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

Helpful resources

Announcements
Meet the 2020 Season 2 Power BI Super Users!

Meet the 2020 Season 2 Power BI Super Users!

Find out who's part of the program this season, and welcome the new Super Users.

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

July 2020 Community Highlights

July 2020 Community Highlights

Learn about the exciting things that happened in July.

Featured Data Story of The Month

Featured Data Story of The Month

All Data Stories Gallery contributions are reviewed for each month. We select a contribution and feature the community member the following month.

Power BI Dev Camp - Developing with .NET Core

Power BI Dev Camp - Developing with .NET Core

Learn how to develop custom web applications for Power BI using .NET Core 3.1 and .NET 5.

Top Solution Authors
Top Kudoed Authors