Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi experts,
I have following information in my table
In my report, I have a filter that lets me choose my year and now,I would like to show 6 KPI's which are the sales for each region, both for the chosen year as for the "chosen year -1".
I managed to set the 3 KPI's for the sales per region, per year but I cannot find a solution for the previous year.
Any idea how I could do this?
Thanks in advance for your help & time
please provide sample app.
According to info you have provided
you can try Sum({<[Region]={"A"},Year = {"$(=max(Year)-1)"}>}[Sales]) for Sales for Region A for chosen year -1
and for Sales for Region A for chosen year, you can use Sum({<[Region]={"A"},Year = {"$(=max(Year))"}>}[Sales])
There are a couple of ways to go about this depending on the structure of your data. You might have a look at the Above function if your data is ordered that way. Another way would be to build a table at load time that is keyed to your main table but that has last years sales in it.
HTH
please provide sample app.
According to info you have provided
you can try Sum({<[Region]={"A"},Year = {"$(=max(Year)-1)"}>}[Sales]) for Sales for Region A for chosen year -1
and for Sales for Region A for chosen year, you can use Sum({<[Region]={"A"},Year = {"$(=max(Year))"}>}[Sales])
Thanks Shraddha, that worked.