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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
BeaudryL
Frequent Visitor

Matrix Conditional Formatting based on Field Measure not working

Thank you in advance for your consideration!

All details in the image - can't figure out why conditional formatting isn't working.

files if desired:

https://www.dropbox.com/scl/fi/8ulppt8k982oupje9zmdl/StdDev-Test-Cleaned.pbix?rlkey=kpt2kmhezd4y4f0n...

https://www.dropbox.com/scl/fi/uyd5cx6qd59hccldspc27/StdDev-Test-Data-Cleaned.xlsx?rlkey=turb6y56q83...

 

BeaudryL_0-1739044797964.png

 

4 REPLIES 4
danextian
Super User
Super User

Hi @BeaudryL 

 

You didn't apply a filter modifier to your overall mean, so it simply returns the average of Response.Value. This results in the average for each combination of Clinician and ID.Q rows, which is essentially the same as your implicit measure of the average Response.Value.

 

The sample measure below will return the same value for all rows of MENTORS table.

Overall_Mean = 
CALCULATE ( AVERAGE ( MENTORS[Response.Value] ), ALL ( MENTORS ) )

danextian_0-1739097771797.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

 

Almost there. Looks like it's calculating the 1_SD_Below_Mean measure line by line also? It is should be highlighting red numbers below 3.48. I would need to change that measure also? Thank you so much for your time!

BeaudryL_0-1739128668544.png

 

BeaudryL
Frequent Visitor

I'm not either - but the measures appear to be calculating properly and display in the cards correctly. Along your line of thought, I suppose is that if it's re-calculating line by line and applying the formatting line by line it's not working because the calculation hasn't completed until the end? 

gmsamborn
Super User
Super User

Hi @BeaudryL 

 

I noticed that your [Standard_Deviation] was returning zero for every row.

 

Because I'm not very experienced with STDEVX.P(), I decided to check CHAT-GPT and found the following:

 

STDEVX.P expects a table with multiple values per group.

 

You're summarizing MENTORS[Clinician] in _MeansByClincian, but @Mean is only storing a single aggregated value per clinician.

 

This means _MeansByClincian has only one row per clinician, making STDEVX.P return zero (since standard deviation requires variation).

 

Fix: Calculate standard deviation at the response level, not at the aggregated mean level. Instead of summarizing means per clinician first, compute the standard deviation directly from MENTORS[Response.Value].

 

 

__SD CHAT-GPT = 
    CALCULATE(
        STDEVX.P( 
            MENTORS, 
            MENTORS[Response.Value]
        )
    )

 

 

This, at least, doesn't return zero for each line.  You'll have to do some checking.

 

Let me know if you have any questions.

(I'm not sure why it is wrapped in a CALCULATE, but I just copied it.)



Proud to be a Super User!

daxformatter.com makes life EASIER!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.