Forum Discussion
point difference between individual points versus average trend line value
- 6 years ago
I was able to solve this by creating the following measures:
ChurnCalc average =AVERAGEX(ALLSELECTED('ChurnDigital'[WeekId]),CALCULATE([Churn]))Churn var to avg = ChurnDigital[Churn] - ChurnDigital[ChurnCalc average]
I am lost as to why you are so horrified. My calculations using this function are working perfectly fine. WeekId is a datetime datatype that I have brought in from SQL.
The reason this calculation works is because it is calculating a cume between a given set of dates based on whatever the starting WeekId is that I have set in my date slider. The sum will vary. My StopCopiesTotal numbers are there for you in the table I attached.
Your response was very rude and not helpful at all.
[Edited by Admin]
I'm quite sure what you are doing is incorrect and potentially very dangerous.
No offense was meant. I was just trying to warn you against writing such things.
By the way, check to make sure you have proper Calendar dimension in your model and perform slicing directly on the fact table, it'll be hard for you to write correct formulas if you don't, especially when manipulation of time is involved.
Best
D