cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NickzNickz
Helper III
Helper III

If result return "Not Started", then text is red color

Hi ...

 

Below is my measure :

Weighted Achievement (%) =

VAR Score = SUM('kpidb kpi_submissions'[score])
VAR Weightage = SUM('kpidb kpis'[weightage])
VAR Stage = 3
VAR Result = Score / Stage * Weightage
RETURN
    IF(ISBLANK(Result), "Not Started", Result)
 
How can we return if the result equal to "Not Started" then the text should also in red color ....
 
Thank you
 
Regards,
NickzNickz
 
1 ACCEPTED SOLUTION
tackytechtom
Super User
Super User

Hi @NickzNickz ,

 

You could create an additional measure which looks like this:

ColourCodeMeasure = If ( [Measure] = "hello", "red", BLANK() )

 

Here the result for my mockup data:

tackytechtom_0-1681789226200.png

Your measure would be something like this. Note you could even use HEX number instead of "red":

ColourCodeMeasure = If ( [Weighted Achievement (%)] = "Not Started", "red", BLANK() )

 

Then click on the arrow facing down in the visualization pane > Conditional Formatting > Font Color

tackytechtom_2-1681789448071.png

 

 

Choose the following settings:

tackytechtom_1-1681789403384.png

 

Let me know if this helps 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
tackytechtom
Super User
Super User

Hi @NickzNickz ,

 

You could create an additional measure which looks like this:

ColourCodeMeasure = If ( [Measure] = "hello", "red", BLANK() )

 

Here the result for my mockup data:

tackytechtom_0-1681789226200.png

Your measure would be something like this. Note you could even use HEX number instead of "red":

ColourCodeMeasure = If ( [Weighted Achievement (%)] = "Not Started", "red", BLANK() )

 

Then click on the arrow facing down in the visualization pane > Conditional Formatting > Font Color

tackytechtom_2-1681789448071.png

 

 

Choose the following settings:

tackytechtom_1-1681789403384.png

 

Let me know if this helps 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @tackytechtom ,

 

Really appreciate it... The result is as expected.... Thanks a lot ...

 

Regards,

NickzNickz

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Top Solution Authors
Top Kudoed Authors