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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
klopdaddy
Regular Visitor

Conditional Formatting in a Matrix Visual- Comparing Weekly data to summarized data

Hello-

I am trying to conditionally format values in cells of a matrix visual based on the summarization of the entire range of cells. In my specific case the columns of the matrix visual are weeks of the year which i want to compare vs. the Standard Deviation across the entire range of data and color code highlight if the value in the cell is outside the stad dev.

klopdaddy_1-1709397716353.png

 

The measure that ive created to calculate the std dev across the range is:

 

stddv_time_bound = CALCULATE(

    STDEVX.S(

SUMMARIZE( table1,   table1[week], "Change",

     CALCULATE(

SUM(table1[sum(column_values)]), table1[column_names] = "forecast 1")

      -

      CALCULATE(

SUM(table1[sum(column_values)]), table1[column_names] = "forecast2")

),

     [Change]),

DATESINPERIOD(table1[week], TODAY(), 12, MONTH), All(table1[week]))

 

And i use this in the below measure to create the color coding.

Color Code = SWITCH(TRUE(),

[Change Forecast] >= [stddev_time_bound],"#de6a73",

 "#B7e8a2")

 

The issue is that the std. dev measure is applied in the visual against only each indidual week which returns NaN due to no variability. 

IS there a way to remove the inherent filter applied by the visual?

 

Thanks in advance for any help

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Read about HASONEVALUE and REMOVEFILTERS

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

Read about HASONEVALUE and REMOVEFILTERS

Very helpful. Thank you

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.