Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a slider defining variables (vStrtDate and vEndDate) on a sale date ranging from 1-Jan-2013 to till date. I am using these variables on an aggregation (count) in a set analysis statement. I want only completed months data but not the current months data. If today is 15th May, I wanted data from 1st Jan 2013 to 31st May 2018 without using IF statement anywhere neither in defining variables or in expressions in frontend objects.
Only data of completed months should be taken into consideration.
Thank you.
Ram
Do you have a calendar with months in your model?
Some ideas: set the upper limit of the vEndDate slider to the last month end date. That way the user can never select a date in the current (incomplete) month.
Or use RangeMin(vEndDate, vMaxCompleteMonths) where vMaxCompleteMonths is a variable that returns the last complete month. Define vMaxCompleteMonths something like this:
Set vMaxCompleteMonths = '=Date(Floor(MonthEnd(Max(Month, 2))))';
or
Set vMaxCompleteMonths = '=Date(Floor(MonthEnd(Max(Month). -1)))';