I have a table with:
ID, delta & Date
I added a calculated column:
SD = CALCULATE(STDEV.P(Query1[delta]),FILTER(Query1,Query1[sys_id] = EARLIER(Query1[sys_id])))
Calculating the standard deviation of delta... for each id.
What I want to do now is that when I have a filter (slicer) on the date column that it doesn't take those rows into account when calculating SD
So I want a Measure instead of a calculated column but the earlier function doesn't work then.
I'm a complete beginner and have googled a lot but can't seem to figure out how it works. How can I filter in the measure to only take the rows with the same ID when calculating?
Many thanks for any pointers in the right direction.
EDIT: I oversimplified I think. Currently, I have the following Graph:
This only shows the values for which a 'relative' significant changes have occurred (delta is 'abnormal'), for that day, for that ID. This I accomplish by filtering the graph where Significance > 1
Significance = ABS(AVERAGE(Query1[delta])) / (AVERAGE(SignificanceLevel[SignificanceLevel]) * AVERAGE(Query1[SD]))
Now my SD is simply calculated as stated above, but I want this to take into account the period I am looking at (data slicer). Because for example further into the past, the situation was worse and changes that are now significant weren't then.
But I still look at the value of each day separately in the graph (and will always have to) so a simple measure will always return 0 for SD for this day as it only looks at that specific day (= 1 row only) and not to all days I specified in my data slicer.
SD
fixed, but theSignificance
to be rolling? – Alexis Olson