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
BaronSdG
Resolver II
Resolver II

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

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

@BaronSdG , 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

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

 

 

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