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.
i am trying to create a measure for background color but i am having issue.
Solved! Go to Solution.
Hi @Anonymous ,
")" is missing at the end of the expression.
BackgroundColor =
IF (
SELECTEDVALUE ( '5DaysSLA'[Working Days] ) < 3,
"#008000",
IF (
SELECTEDVALUE ( '5DaysSLA'[Working Days] ) > 3
&& SELECTEDVALUE ( '5DaysSLA'[Working Days] ) < 5,
"#FFBF00",
"#FF0000"
)
)
In addition, you can also try this measure, which works the same as yours:
BackgroundColor =
SWITCH (
TRUE (),
SELECTEDVALUE ( '5DaysSLA'[Working Days] ) < 3, "#008000",
SELECTEDVALUE ( '5DaysSLA'[Working Days] ) > 3
&& SELECTEDVALUE ( '5DaysSLA'[Working Days] ) < 5, "#FFBF00",
"#FF0000"
)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
")" is missing at the end of the expression.
BackgroundColor =
IF (
SELECTEDVALUE ( '5DaysSLA'[Working Days] ) < 3,
"#008000",
IF (
SELECTEDVALUE ( '5DaysSLA'[Working Days] ) > 3
&& SELECTEDVALUE ( '5DaysSLA'[Working Days] ) < 5,
"#FFBF00",
"#FF0000"
)
)
In addition, you can also try this measure, which works the same as yours:
BackgroundColor =
SWITCH (
TRUE (),
SELECTEDVALUE ( '5DaysSLA'[Working Days] ) < 3, "#008000",
SELECTEDVALUE ( '5DaysSLA'[Working Days] ) > 3
&& SELECTEDVALUE ( '5DaysSLA'[Working Days] ) < 5, "#FFBF00",
"#FF0000"
)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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.