Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
User | Count |
---|---|
25 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
27 | |
13 | |
11 | |
9 | |
6 |