Hello everyone,
I am working with SAS Visual Analytics and trying to create a bar chart that displays cumulative totals across multiple date hierarchies (e.g., Year and Month). I have successfully implemented a basic cumulative total using the CumulativePeriod function for a single year, following the approach suggested in a recent community thread (using CumulativePeriod(_Sum_, Value, IgnoreAllTimeFrameFilters, 'Year'n, Inferred, ByYear, 0, 1, Full)).
However, my requirement extends beyond a single date hierarchy. Specifically, I need the cumulative total to reset at the beginning of each year while still displaying data for multiple years side by side in the same bar chart. When I add multiple years to the category role, the cumulative calculation does not behave as expected — it either accumulates across all years without resetting, or returns missing values due to date reference conflicts.
My questions are:
I am using SAS Viya 4 with the latest version of Visual Analytics. Any guidance or examples would be greatly appreciated.
Thank you!
on using the CumulativePeriod operator ...
See
VA Report Example: Ways to use the Cumulative Period operator
by TeriPatsilaras on 23-SEP-2020
The above SAS Communities Library - article also discusses a cumulative sum of monthly expenses with a reset for each year.
BR, Koen
Dive into keynotes, announcements and breakthroughs on demand.
Explore Now →See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.