Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi all,
I need to colour some data of a specific table. I want to do that according a specific value entered in a slicer.
P.e. I choose 85. For Tª max <85 i want to colour in red; Tª max >85 in green
Have a look of my table.
How can iI do that?
Thank you for your support!
Solved! Go to Solution.
Hi, @Anonymous
According to your description, you want to set the value color based on the Slicer value, you can follow my steps:
Background color =
var _selected=SELECTEDVALUE('Ta Slicer'[Ta Slicer])
return
IF(MAX('Table'[Ta max])<_selected,"red","green")
Then set the field font color to white, and you can get what you want, like this:
You can download my test pbix file here
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
According to your description, you want to set the value color based on the Slicer value, you can follow my steps:
Background color =
var _selected=SELECTEDVALUE('Ta Slicer'[Ta Slicer])
return
IF(MAX('Table'[Ta max])<_selected,"red","green")
Then set the field font color to white, and you can get what you want, like this:
You can download my test pbix file here
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , Create a color measure like given below and use that in conditional formatting option using "Field Value"
if([T max] <selectedValue('T Slicer'[Value]) ,"Red" , "Green")
Refer docs for steps https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
Please consider this solution
Don’t forget to accept the solution and/or click the thumbs up to leave kudos. Thank you!
Create a list of temperatures for your slicer, and a table of temperatures for your report.
Add this dax measure
RAG =
VAR mintemp = MIN(Mylist[Temperature])
VAR maxtemp = MAX(Mylist[Temperature])
RETURN
SWITCH(TRUE(),
SELECTEDVALUE(Mytable[Temperature]) < mintemp , "red",
SELECTEDVALUE(Mytable[Temperature]) > maxtemp , "red",
"green"
)
In the report right click on Temperature > conditional formatting > background colour > format by = field value > based on field = RAG
Click here for example
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
85 | |
66 | |
51 | |
45 |
User | Count |
---|---|
217 | |
89 | |
82 | |
66 | |
57 |