Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to create a cumulative sum for YTD based on a user's selection
The user selects PeriodYear (an integer value), PeriodMonth (integer from 1-12), so I would like the sum(Amount) from month 1 to the users selection. I've been trying solutions suggested online and I simply can't get this to work, any help would be really appreciated.
If user selects both PeriodMonth and PeriodYear then this should be sufficient.
SUM({<PeriodMonth={"<=$(=max(PeriodMonth))"}>} Amount)
Thanks for that. When I do this, it gives only the value of the selected month and not the cumulative amount for the year
The above is if month 1 is selected
If Month two is selected
And if month 1 and 2 selected
What I would like to see is if a month is selected, Budget column shows only that month, and BudgetYTD shows the sum of each month from the beginning of the year.
Correction, if month 1 and 2 are selected
Do you have other current selection than the PeriodMonth selections? How does it behave if you only make selections in that field?
There is another field selected. Because of another issue with the data set, I have had to create a filter to only show data relating to the latest load date, called Calendar 1. I'm just doing some testing, please bare with me
I have removed that value and still have the same problem. For reference, expression used for Budget is
fabs(Sum({ <ProductType = {'Budget'}>} Amount))/1000, and the expression used for BudgetYTD is
SUM({<PeriodMonth={"<=$(=max(PeriodMonth))"}> * <ProductType = {'Budget'}>} Amount)/1000
If month 1 is selected I get
If I select month 2 i get
And if both are selected I get