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
am_0106
Frequent Visitor

How to do conditional formatting having different rules for the same column

Hi,

 

I am trying  to attach conditional formatting for one of the columns in my report. Now I have different set of rules for different rows of the same column. Is there a way to add different set of rules for conditional formatting in the same column?

I will really appreciate any suggestions.

 

Kind Regards,

Ayush

7 REPLIES 7
v-eachen-msft
Community Support
Community Support

Hi @am_0106 ,

 

You could create a measure to set different rules of conditional formatting by IF() or SWITCH() functions. Like the following DAX:

measure =
IF ( SELECTEDVALUE ( 'Table'[Column] ) > 0, "#00FF00", "#EE00CC" )

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

This means I have to define a new measure in the cube itself and pull it to the Power BI, that idea did hit me as well but I wanted to see if I can to it in the Power BI itself.

 

jdbuchanan71
Super User
Super User

@am_0106 

Yes, it should be possible.  Can you share some sample data and expected results?  Please share the sample data in a table format, not a screen shot.

Goals Current Performance Expected Performance Indicator 
YTD Old Application15451325116.6
YTD New Application798101298.7
Avg Days from Application to eligibility 2030-10

 

I want to add conditional formatting on Indicator column where the first two rows have a percentage calculated value and the bottom one is the difference between Second and third columns. 

In your example can you tell me what is a column in a table and what is a measure?

Hi,

 

Since i am using a live connection with SSAS MD cube, I had created these as calculated columns and created a new DSV to import it in Power BI.

 Thanks Ayush 

Can you show me a picture of the table where these are coming from?

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.