Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
nosirui54
Helper I
Helper I

Color Measures For Incidents

I had been having this problem for about two days. Am really banging my head now, please i need some help.

Please how do I create Color Measures for these Incidents:

  • Critical  - (Red)
  • High    -   (Light Red)
  • Low       -  (Blue)
  • Medium  - (Light Blue)
  • Very Low - (Grey)

Like I want any incident reported as critical to be Red, while High incidents to be Light Red and so on.

1 ACCEPTED SOLUTION
TheoC
Super User
Super User

Hi @nosirui54 

 

You can use a conditional statement such as the following:

 

Background Colour = 

SWITCH ( 
SELECTED VALUE ( 'table'[column] ),
"Critical" , "Red" ,
"High" , "Light Red" ,
"Low" , "Blue" ,
"Medium" , "Light Blue" ,
"Very Low" , "Grey" , 
"White" )

 

You can change the "white" to whatever but it represents the "false" in what if none of the conditionals are true.  

 

You can also change the colours to specific colours you want by adding the "FF0000" for red, etc., etc.

 

Hope this helps 🙂

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

View solution in original post

6 REPLIES 6
nosirui54
Helper I
Helper I

@TheoC Just tried it again. it works. Thanks

TheoC
Super User
Super User

Hi @nosirui54 

 

You can use a conditional statement such as the following:

 

Background Colour = 

SWITCH ( 
SELECTED VALUE ( 'table'[column] ),
"Critical" , "Red" ,
"High" , "Light Red" ,
"Low" , "Blue" ,
"Medium" , "Light Blue" ,
"Very Low" , "Grey" , 
"White" )

 

You can change the "white" to whatever but it represents the "false" in what if none of the conditionals are true.  

 

You can also change the colours to specific colours you want by adding the "FF0000" for red, etc., etc.

 

Hope this helps 🙂

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

@TheoC Thank you so much for saving me from this headache. I truly appreciate it. 
Please is there a way to show only colors in the background, maybe in another column without showing Incident name with the background color? Have tried some method but is not just working.

Hi @nosirui54,

 

You should be able to replicate the process and apply it to the Font colour the same way you have for the Background colour 🙂 I tested it out and it works perfectly 🙂

TheoC_0-1634607695334.png

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

@TheoC I tried the process but is not working, i guess it works as shown above because you use black background. I'll leave it as its for now. 

Thank you for time. 

Hi @nosirui54 I used black and white background and black and white font.  The output hides the font because the font is the identical colour to the background.  If you are using different colours, I recommend using something like this site so that you can pick the exact colour you want for the background and the font instead of using "red" "blue" etc etc: https://www.rapidtables.com/web/color/RGB_Color.html

 

By picking the exact colour code, you will have confidence that the font and the background will match perfectly. 

 

Hope this helps mate 🙂

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.