Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi I want to calculate a montly standard deviation
I want to calculate the standard devation in DAX from my fact table but not the SD per row but totalled per month.
My data looks like this
Customer | date | Sales |
A | 1-1-2023 | 20 |
A | 15-1-2023 | 50 |
A | 5-2-2023 | 10 |
A | 10-3-2023 | 150 |
B | 1-1-2023 | 50 |
B | 5-3-2023 | 1 |
Now I want a DAx formula which first calculates the total sales per month. e.g. for customer A see below and after that calculates the standard deviation per month.
Customer | Month | Sales |
A | 1-2023 | 70 |
A | 2-2023 | 10 |
A | 3-2023 | 150 |
If i would calculate the st dev using
if you want the sum of sales for each month alone, try using
SUMX(values([Month-Year]),[sales measure])
or
CALCULATE(SUM([Amount]),ALLEXCEPT(Table,[Month-Year],[Category]))
this will give you sum of sales by month - year use the first if you dont have ctageories an dsub categories and use the second if you have categories and sub categories
Hi @BobKoenen try measure
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
44 | |
28 | |
21 | |
12 | |
8 |
User | Count |
---|---|
74 | |
51 | |
45 | |
16 | |
12 |