March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi, I would like to set a condition whereby if the value in "date range' column shows 'within date range', the rating column and true rating outcome will change color depending on whether it is MOD (YELLOW) & SUS (GREEN). May i know how can i achieve this?
Solved! Go to Solution.
Hi @TTPP81 ,
You can create measures that adjust your formatting, for example:
CondFmt_Rating =
VAR __timeValue = SELECTEDVALUE(CF_Test_Table[Date Range])
VAR __ratingValue = SELECTEDVALUE(CF_Test_Table[Rating])
RETURN
SWITCH(
TRUE(),
__timeValue = "Within" && __ratingValue = "MOD", "#FEC0BF", // your yellow hex code
__timeValue = "Within" && __ratingValue = "SUS", "#99E3DD" // your green hex code
)
CondFmt_TrueRating =
VAR __timeValue = SELECTEDVALUE(CF_Test_Table[Date Range])
VAR __trueValue = SELECTEDVALUE(CF_Test_Table[True Rating])
RETURN
SWITCH(
TRUE(),
__timeValue = "Within" && __trueValue = "MOD", "#FEC0BF", // your yellow hex code
__timeValue = "Within" && __trueValue = "SUS", "#99E3DD" // your green hex code
)
Once you've created the measures, you apply them to the visual using Cell Elements > Series (the column you want to format) > Background Colour (fx) > Field Value > select conditional format measure from dropdown list.
In this example, I get the following output:
Pete
Proud to be a Datanaut!
Hi @TTPP81 ,
You can create measures that adjust your formatting, for example:
CondFmt_Rating =
VAR __timeValue = SELECTEDVALUE(CF_Test_Table[Date Range])
VAR __ratingValue = SELECTEDVALUE(CF_Test_Table[Rating])
RETURN
SWITCH(
TRUE(),
__timeValue = "Within" && __ratingValue = "MOD", "#FEC0BF", // your yellow hex code
__timeValue = "Within" && __ratingValue = "SUS", "#99E3DD" // your green hex code
)
CondFmt_TrueRating =
VAR __timeValue = SELECTEDVALUE(CF_Test_Table[Date Range])
VAR __trueValue = SELECTEDVALUE(CF_Test_Table[True Rating])
RETURN
SWITCH(
TRUE(),
__timeValue = "Within" && __trueValue = "MOD", "#FEC0BF", // your yellow hex code
__timeValue = "Within" && __trueValue = "SUS", "#99E3DD" // your green hex code
)
Once you've created the measures, you apply them to the visual using Cell Elements > Series (the column you want to format) > Background Colour (fx) > Field Value > select conditional format measure from dropdown list.
In this example, I get the following output:
Pete
Proud to be a Datanaut!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
21 | |
16 | |
13 | |
13 | |
9 |
User | Count |
---|---|
36 | |
31 | |
20 | |
19 | |
17 |