Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
My data consists of historical quantities sold each day of each product.
I have already calculated the rolling sum of products sold in a period, currently 30 days.
Measure 1:=CALCULATE(SUM([qty]); DATESINPERIOD('Calendar'[Date]; LASTDATE('Calendar'[Date]); -30; DAY))
Using this rolling sum, I want to detect products that are "Seasonal" products, where there are significant peaks in the rolling sum of quantity sold, versus "non-seasonal" products (where the rolling sum of the quantity of products sold is quite steady).
I am not a statistician, but I think I can use the standard deviation of this rolling sum for each product to detect products with peaks in its sales...
Any idea how I can do this in DAX?
Thanks,
Koen
Hi @KJanssens
Try the below DAX functions.
STDEV.P | Returns the standard deviation of the entire population. |
STDEV.S | Returns the standard deviation of a sample population. |
STDEVX.P | Returns the standard deviation of the entire population. |
STDEVX.S | Returns the standard deviation of a sample population. |
Hi @Mariusz ,
I know these functions, but it seems I cannot just use it on the first measure:
Measure 2:= STDEV.P([Measure 1])
Any idea how I can do this?
Hi @KJanssens
The argument that is expected is Column not Measure.
You can try using STDEVX.P this will allow you to pass a Measure as a second Argument
User | Count |
---|---|
69 | |
43 | |
21 | |
20 | |
14 |
User | Count |
---|---|
124 | |
41 | |
39 | |
28 | |
24 |