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
rgadbois
Frequent Visitor

Z-Score DAX Measure

Hi,

 

I am attempting to create a scatter plot visual in which I can look at the Z-score of two separate metrics (one on X-axis, one on Y-axis) on a near-daily basis. What my variables are for defining the parameters of the Z-score are as follows:

Mean: 28-day rolling average

Standard Deviation: 28-Day total STDEV

X: (Almost) daily value

Below is the DAX measure I created:

 

_PL Test =
VAR PL28Rolling = CALCULATE(AVERAGE(Catapult[PL]), ALL(Dates), AND(Dates[week index] <= -1, 'Dates'[week index] >= -4))
VAR PL28RollSTD = CALCULATE(STDEV.P(Catapult[PL]), ALL(Dates), AND(Dates[week index] <= -1, 'Dates'[week index] >= -4))
VAR DailyPL = CALCULATE(AVERAGE(Catapult[PL]), ALL(Dates), Dates[day index] = 0)
RETURN
(DailyPL - PL28Rolling) / PL28RollSTD
 
My date table linked to the "Catapult" table appears as follows:
rgadbois_0-1668698601566.png

The issue I am running into is that, such as for today, it appears that PowerBI is calculating values for days which have no data, and making them a "0". My values range as below, but these values are much larger than should be expected:

rgadbois_1-1668698713393.png

 

Any help on this would be greatly appreciated! I am still pretty new to DAX and creating complex measures such as this.

 

Thank you!

1 REPLY 1
Anonymous
Not applicable

Hi @rgadbois ,

I'm a little confused about your needs, Could you please explain them further? It would be good to provide a screenshot of the results you are expecting and desensitized example data.

Thanks for your efforts & time in advance.

 

Best regards,
Community Support Team_ Binbin Yu

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.