Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
I'm trying to calculate Z scores by Store with a Calendar Week Slicer. If I select a single week my z scores return correctly, however, if I default to All they inflate.
Here's my formula:
Sales Units Z Score = var Mean = CALCULATE(SUMX(Values('Calendar'[Week]),[Avg Sales Units]),ALLEXCEPT('Reports DM_STORE','Reports DM_STORE'[Store Number])) var StandardDeviation = CALCULATE(STDEV.P('Reports FACT_SUMMARY'[SalesUnits]),ALLEXCEPT('Reports DM_STORE','Reports DM_STORE'[Store Number])) return (SUM('Reports FACT_SUMMARY'[SalesUnits]) - Mean) / StandardDeviation
I tried altering hte STDEV.P formula to the STDEVX.P to iterate over the records, but it still returns the same Z Score when it's all said and done.
Single Week Slicer Results:
StoreNumber: 1; Sales Units Z Score: 2
All Week Slicer Results:
StoreNumber1; Sales Units Z Score: 98.64
Any idea how I can aggregate appropriately dependent on my slicer selection?
Any help would be appreciated!
Thanks,
Channing
bump
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
9 | |
8 | |
8 |
User | Count |
---|---|
14 | |
12 | |
11 | |
11 | |
8 |