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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
NJ81858
Helper IV
Helper IV

Conditional Formatting Measure

Hello,

 

I have a matrix that is made up strictly of measures, and I want to conditional format some of the values, I am just not sure how to do it.

 

I have a table that is set up with only one column and the following rows:

     Type     
     # of Sales
     $ of Sales     
     % of Sales     

 

From there, I created measures for each of my categories, since some of my categories are Stores, some are specific products, and some are types of products.

 

An example of my measures are:

 

Location A = 
IF(
    MIN('Table'[Type]) = "# of Sales", CALCULATE(COUNT('Data Table'[Tran ID), FILTER('Data Table', [Location] = "Location A")),
IF(
    MIN('Table'[Type]) = "$ of Sales", FORMAT(CALCULATE(SUM('Data Table'[Tran Amt]), FILTER('Data Table', [Location] = "Location A")),"$#,##0"),
IF(
    MIN('Table'[Type]) = "% of Sales", FORMAT(DIVIDE(CALCULATE(SUM('Data Table'[Tran Amt]), FILTER('Data Table', [Location] = "Location A")), [TOTAL SALES AMOUNT]), "#0.#%"))))

 

 

the only difference between my measures is the filters that are placed on them in the calculations.

 

My end Matrix looks like this:

 

          Calculation                    # of Sales                    $ of Sales                    % of Sales          
          Location A                    125                    $1250                    25%          
          Product Z                    50                    $800                    15%          

 

Where my Columns are the three values for Type, and the Values are all of my created measures, but I selected the "Switch Values to rows" option in my matrix to make it appear as a table.

 

Is it possible to format only one of the columns if they are all conditional measures? Also as a side question, is there a better way to calculate this table? Thank you in advance!

1 REPLY 1
amitchandak
Super User
Super User

@NJ81858 , In place of that you can consider field parameters or calculation group

 

Power BI Field Parameters — A Quick way for Dynamic Visuals: https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9af...
Power BI Field Parameters- Measure Slicer and Axis/Dimension slicer: https://youtu.be/lqF3Wa1FllE

 

Calculation Groups- Measure Slicer, Measure Header Grouping, Measure to dimension conversion. Complex Table display : https://youtu.be/qMNv67P8Go0

 

New dynamic formatting can also help

https://powerbi.microsoft.com/en-us/blog/deep-dive-into-the-new-dynamic-format-strings-for-measures/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.