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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
lawada
Helper III
Helper III

trying to use conditional formatting

hello everyone!

 

i have created a cohort in power bi in a matrix visual and im trying to change the values backgroundcolor using the conditional formating however im unable to get my intended output 

 this is the output im getting:

lawada_0-1636271546612.png

lawada_1-1636271624412.png

 

i want to to exculude color from first column with a title '0'  which only have '100%' value, so backgroundcolor should appear starting from column 1 and i want the color rule to apply to rows instead of columns . so for a specific month , i want to see the color changing between the values from 1 to 20 according to the values for that month .

 

 

thanks in advance

 

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@lawada 

I created a sample file with my data and tried to answer your question.  To apply CF across columns by row, you need to create a measure that ranks the values across columns and excludes the unnecessary column: Please check the measure below. File attached below

 

 

CF Rank = 
IF(
    MAX(financials[Month Number])<>1,
    CALCULATE(
        RANKX(
            ALLSELECTED( financials[Month Number] ),
            [Total Units]
        ),
        KEEPFILTERS( financials[Month Number] <> 1 )
    )
)

 

 

Fowmy_0-1636294648365.png
When you apply conditional formatting, choose Don't Format under default Formatting

 

Fowmy_2-1636294797483.png

 



 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

2 REPLIES 2
Fowmy
Super User
Super User

@lawada 

I created a sample file with my data and tried to answer your question.  To apply CF across columns by row, you need to create a measure that ranks the values across columns and excludes the unnecessary column: Please check the measure below. File attached below

 

 

CF Rank = 
IF(
    MAX(financials[Month Number])<>1,
    CALCULATE(
        RANKX(
            ALLSELECTED( financials[Month Number] ),
            [Total Units]
        ),
        KEEPFILTERS( financials[Month Number] <> 1 )
    )
)

 

 

Fowmy_0-1636294648365.png
When you apply conditional formatting, choose Don't Format under default Formatting

 

Fowmy_2-1636294797483.png

 



 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

working perceftly. thank you ! 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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