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

Don'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.

Reply
Anonymous
Not applicable

Color Formatting with a boolean measure

Hi all,

 

I have used conditional formatting but is not working properly on all the tiles as intended. It should only provide green and red but it also gives this middle color for some reason image.png

 

the column values are a measure (I converted the yes into 0 and 1): 

Convert_Trading_YesTo1 = IF(components_mkt[trading]="yes",1,0)

 

 

This is the formatting used

 

image.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

EDIT

Solved by substituting SUM in the Summarization with Max

----

 

For some strange reason, the format is working for the other columns but not for this one

 

 

Wrong result

BaronSdG_0-1615891554898.png

 

Correct result

BaronSdG_1-1615891658852.png

 

 

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , Try rule based on this. you should able to give value based on that.

 

Or create a color measure like

 

Convert_Trading to color = IF(max(components_mkt[trading])="yes","green","red")

and use that with field value option

 

refer my video for steps: https://www.youtube.com/watch?v=RqBb5eBf_I4

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Anonymous
Not applicable

EDIT

Solved by substituting SUM in the Summarization with Max

----

 

For some strange reason, the format is working for the other columns but not for this one

 

 

Wrong result

BaronSdG_0-1615891554898.png

 

Correct result

BaronSdG_1-1615891658852.png

 

 

Anonymous
Not applicable

The rule value is NOT working. for some reason

BaronSdG_2-1615895386812.png

 

 

For the columns which have yes/no, am I obliged to make a color measure for each column that I want to format?

 

Also, I tried using the SWITCH measure format below but it is not working. I can't the measure select it in the 

NA_AssetClass_Color = SWITCH(max('Connectivity Coverage analysis xlsx_https://iontradingcom sharepoint com/teams/F'[NA (North America)]),

"yes", "#71DF8C"

,"", "#E6E6E6","#FFD86C")

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.