Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have an expression that displays a KPI for the last 12 months like this:
SUM({$<ACC_DATE={">=$(=MONTHSTART(MAX(ACC_DATE),-11))<=$(=MAX(ACC_DATE)-1)"}>}AMOUNT)
So that means I get the AMOUNT between April 2016 and March 2017.
I need to see the data until the last month is closed, that's why I don't consider the current month, April 2017.
The thing is that if I select Year = 2016, it shows me from January 2016 to November 2016 (without December 2016).
What I would need is to show the following:
- At the beginning: Last 12 months (without current month).
- If I select a year: The corresponding period (from Jan to Dec).
- If I select a year and a month: The data for that month only.
- If I select a year and N months: The data for those months only.
Do you know how could I handle this?
Thank you!
How about a if else clause based on the getselectedcount(year) and getselectedcount(month)??