Hi everyone !
I have a dashboard with some filters that modify a table. I would like to update the background color on a column while applying filters.
Is it possible to update the values of the rules for the background color (conditional formatting) while applying the desired filters? Is it possible to do it interactively or the limit values are static?
Solved! Go to Solution.
Thank you so much but I wonder if it is possible to modify dinamically the background colour using rules based on numeric values. Is it possible to change those values while applying filters?
Hi, @JOctavio
You can try the following methods.
Color Measure =
Var _value=SUM('Table'[Value])
Return
SWITCH(TRUE(),
_value>=0&&_value<=33,"Green",
_value>=34&&_value<=66,"Orange",
_value>=67&&_value<=100,"Red")
Result:
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @JOctavio
You can try the following methods.
Sample data:
Table:
Slicer = VALUES('Table'[Type])
Color Measure = SWITCH(TRUE(),
SELECTEDVALUE('Slicer'[Type])=BLANK(),BLANK(),
SELECTEDVALUE('Slicer'[Type])="Type1","Red",
SELECTEDVALUE('Slicer'[Type])="Type2","Yellow",
SELECTEDVALUE('Slicer'[Type])="Type3","Blue")
Result:
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you so much but I wonder if it is possible to modify dinamically the background colour using rules based on numeric values. Is it possible to change those values while applying filters?
Hi, @JOctavio
You can try the following methods.
Color Measure =
Var _value=SUM('Table'[Value])
Return
SWITCH(TRUE(),
_value>=0&&_value<=33,"Green",
_value>=34&&_value<=66,"Orange",
_value>=67&&_value<=100,"Red")
Result:
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@v-zhangti can we actually use this method also for KPIs? In this case should I use this Measure instead Target?
@JOctavio , you can use isfiltered for that
if(calculate(isfiltered (Table[Category]) , allselected()) , "Red", "Black")
You can use that is conditional formatting using field value option
example
https://www.youtube.com/watch?v=sXn-QZqLD-8
Conditional formatting
How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/...
https://amitchandak.medium.com/power-bi-where-is-the-conditional-formatting-option-in-new-format-pan...
User | Count |
---|---|
211 | |
80 | |
79 | |
76 | |
49 |
User | Count |
---|---|
172 | |
92 | |
85 | |
80 | |
71 |