cancel
Showing results 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.

New Member

## Conditional Formatting in Matrix using the Mean of a Column

I have a Measure called [Cascata Acumulado Rec sobre Total] that is a calculated measure, it shows the acumulated percentage in the Safra variable for the current Month (NOTE: I can`t calculate AVERAGE() of this measure)

In the image below you can see the matrix

I want to paint the background of the cell RED if the value is below the AVERAGE of that Month

So this is what i want to have

I've tried several approaches, but I couldnt figure it out, I know that my conditional formatting measure is something like this:

Color =
VAR ValorAtual = [Cascata Acumulado Rec sobre Total]
VAR AvgMonth = [Medida MediaMes]
RETURN
IF(
ValorAtual < AvgMonth,
"Red",
"White"
)

The thing is, I need to kind of lock the Average just to calculate the AVERAGE of the month, so i can have something like this

So that i can calculate my Conditional Formatting Measure to us in my matrix
1 ACCEPTED SOLUTION
Community Support

Below is my table:

The following DAXmight work for you:

``````Column =
IF('Table'[Cascata Acumulado Rec Sobre Total]<'Table'[Average_Measure] , 1,0)``````

The final output is shown in the following figure:

Best Regards,

Xianda Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support

Below is my table:

The following DAXmight work for you:

``````Column =
IF('Table'[Cascata Acumulado Rec Sobre Total]<'Table'[Average_Measure] , 1,0)``````

The final output is shown in the following figure:

Best Regards,

Xianda Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Announcements

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

#### Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

#### Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors