Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to get sales of previous month when using a slicer for a month.
I can't get this to work. I'm able to get the previous month by using =addmonths(Dato,-1).
How can I add this to my sum function?
Thanks.
if you have month dates as the dimension in the chart it will only show corresponding period data
you need to use the above() function
example
Dimensions
MonthName
Measure
sum(Sales) <-- this will show that months sales
Above(sum(Sales)) this will show sum(Sales) for the row above the current row
refer below
Well, I would like to use it as a KPI and not in a table, which means I still need a measure to calculate this..
latest month
=sum({<Datefield={">=$(=Date(Monthstart(Max(Date))))<=$(=Date(Max(Date)))"}>}Sales)
Prior Month
=sum({<Datefield={">=$(=Date(Monthstart(Max(Date),-1)))<=$(=Date(Monthend(Max(Date),-1)))"}>}Sales)