How to calculate a running total in the visualization
Question Description:I am trying to calculate the running total divided by another running total in the visualization. E.g. the cumulative sum of spend, divided by the cumulative sum of days left in a quarter. Is that possible in visualization or model?
Answer:
Yes, you can use a calculated field with the following formula
SUM(@spend)/MIN(DATE_DIFF(@date,DATE_TRUNC(@date,'QUARTER'),'DAY'))
Was this article helpful?