Forum Discussion
Cumulative % increase, based on a parameter
- 3 years ago
National Common Sum = SUM('Sample'[National Common])
First date = CALCULATE(FIRSTDATE('Sample'[Date]),ALLSELECTED('Sample'))
First day value =
var first_date = [First date]
return CALCULATE([National Common Sum],FILTER(ALLSELECTED('Sample'),'Sample'[Date]=first_date))% Increase - NC = DIVIDE([National Common Sum]-[First day value],[First day value])
You can use a simple date slicer.
National Common Sum = SUM('Sample'[National Common])
First date = CALCULATE(FIRSTDATE('Sample'[Date]),ALLSELECTED('Sample'))
var first_date = [First date]
return CALCULATE([National Common Sum],FILTER(ALLSELECTED('Sample'),'Sample'[Date]=first_date))
% Increase - NC = DIVIDE([National Common Sum]-[First day value],[First day value])
You can use a simple date slicer.
Thank you! That worked well. I have a few questions:
National Common Sum - Why was this required instead of just using [National Common]? Could this have been achieved by changing the "Summarization" to Sum for [National Common]?
I ended up combining this into one measure. Would you mind providing some notes on the Calculate, Filter, and AllSelected functions?