The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have a range slicer of percentage from which I can select the values between 0-5%, 6-10% and >10%
Please note that I dont want these slicers to be used for data filtering instaed, I want them to use for coloring in Matrix.
Ex- If I select the range from the slicer 0-5%, all the rows in the matrix, should change the color.
Hi @Anonymous ,
@Daniel29195 Thank you, for your helpful and quick response.
You can also consider the following method.
I am not sure how your semantic model looks like.
Based on your description, here is the dummy data I created.
Table:
SlicerTable:
The fields in the matrix are as follows.
Please try code as below to create a measure.
MEASURE =
SELECTEDVALUE ( Slicer[Percentage] )
Then select the your matrix, and in the Visualizations pane, under Visual > Cell elements > Background color, click "fx" icon, and do the following.
The field of the slicer is from SlicerTable. When you select "0-5%" in the slicer, Result is as below.
Is this the result you expect?
Please correct me if I misunderstood your needs.
Best Regards,
Yulia Yan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for your response Yulia.
However it does not meet my expectations. My expectations is below-
If you can see from the slicer in left, we have seleted two ranges and according color has been filled in. Green for 0-5% and Amber for 6-10%
@Anonymous
create a measure, like this :
measure =
switch(
true(),
condition 1 , "red",
condition 2 , "blue" ,
....
)
in the matrix, go to cell elemnts, background color, and choose field value --> select the measure you created above .
hope this helps.
If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution ✅
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠
It is filtering the data which is not the actual requirement.