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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
MStark
Helper III
Helper III

Matrix Column Conditional Formatting

Hi All,

 

Im trying to have conditional formatting on a full column but having trouble since it only goes on the Values and Totals but the first row on each level is not being formatted. 

Format Flag1 =
VAR Level1 = SELECTEDVALUE('Intacct Path'[Level 1])
VAR MonthYear = SELECTEDVALUE('All Dates'[Month-Year])
RETURN
    SWITCH(
        TRUE(),
        MonthYear = "YTD" , 3,
        Level1 = "Net Income", 2,
        0
    )
MStark_0-1753465414964.png

 

MStark_1-1753465428039.png

 

Any help/ideas will be appreciated! Thanks in advance!
4 REPLIES 4
MStark
Helper III
Helper III

@Elena_Kalina@lbendlin and @FBergamaschi Thanks for taking the time to respond!!

As @lbendlin mentioned, there is no data there as its a row header (totals are set to be on the bottom) which is why the measure wont generate anything on that line. Was wondering if theres another way to get this column formatting as we need to differentiate between the month column and the YTD column. Or if formatting is not possible, any other ideas?

 

Thanks in advance!

Elena_Kalina
Solution Sage
Solution Sage

Hi @MStark 

Make sure the correct aggregation is set for this measure (typically "Sum" for financial data), and also check the "Subtotals" settings—they should be enabled for the top level.

If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

Thank you.

lbendlin
Super User
Super User

There is nothing there so you cannot apply a format either.  Consider using tabular layout to not have that blank space.

FBergamaschi
Solution Sage
Solution Sage

I would test the formula putting the column FormatFlag1 in the visual to see the value returned where you get no format

 

I am not expert of formatting but looking at the formula you will get a 0 wherever is not formatted and I do not see a rule for that value in your screenshots

 

Should not you include also "Revenues" for Level 1, for example, to get the value 2?

 

Best

If this helped, please consider giving kudos and mark as a solution

@me in replies or I'll lose your thread

Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page

Consider voting this Power BI idea

Francesco Bergamaschi

MBA, M.Eng, M.Econ, Professor of BI

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors