Forum Discussion
tsol01
6 years agoFrequent Visitor
Time series indexation
Dear all, I am trying to calculate an index value for time series data which should be used as a basis for % change calculations. Desired outcome: Sales month Pct % index basis calc...
- 6 years ago
As long as the filter on mindate works i dont believe you need to combine the two, if theres more than 1 value per date in [Ptr %] i believe that all we need to do is change it to AVERAGE().
Measure = VAR minDate = [minDate] Return CALCULATE(AVERAGE(Table[Pct %]) ; ALL(Datatable) ; Datatable[Sales Month] = minDate)
Br,
J
tsol01
6 years agoFrequent Visitor
I came to the same insight just a few minutes ago 🙂 thank you very much for your support! Saved my day!
I just changed it a bit and removed the ALL clause so the solution looks like this now:
Get the first date:
minDate = CALCULATE(min(Table[Sales date]), ALLSELECTED(Table[Sales date]))
Calculate the index basis:
indexValue = var minDate = [minDate] Return CALCULATE(AVERAGE(Table[Pct %]), Table[Sales date]=minDate)
Indexate with the index basis:
Pct indexed % = AVERAGE(Table[Pct %])/[indexValue]
tex628
Community Champion
6 years agoHappy to hear that! I hope it continues just as well 🙂
/ J