Creating period comparisons with QuickSight's periodOver and periodTo functions

Hi @acharchar, I’m glad you found this helpful!
I think it depends what you’re trying to do with the runningSum. I took the periodOverPeriodLastValue out of your calc and changed it to

runningSum(sum(Sales),[{Date (Period)} ASC],[truncDate("MM",{Date (Period)})])

This is basically telling it that for each Month I want go get a running total, and then reset at the start of the following month (the partition).

In my dataset, with my granularity set to Day this gave me the following. You can see in the table the values for December start afresh and add each day to the RunningSum. Likewise the graph is quite clear.

Is that what you’re looking to do?

1 Like