Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a pivot table with months as a dimension. My first expression is a simple =sum(Sales), that shows the total sales of each month.
I want to create another expression that shows the sales of the 3 previous months besides the sales each month. For example, on the month of July, my first expression would show the sales of July, while my second expression would show the sales of April, May and June.
Thanks in advance for your help!
Its not straight forward to present data from another field value on a dimension value, eg June and May values on the July dimension.
One way to do this is to implement an as of calendar. Take a look at @hic blog post on the topic. https://community.qlik.com/t5/Qlik-Design-Blog/The-As-Of-Table/ba-p/1466130
Perhaps this?
Dimension : Month
Expression - (1)
Sum(Sales)
Expression - (2)
Sum({<Month = {">=$(=AddMonths(Max(Month),-3))<=$(=Max(Month))"}>} Sales)
Try RangeSum(Above(Sum(Sales),1,3))
See more on https://community.qlik.com/t5/Qlik-Design-Blog/The-Above-Function/ba-p/1465357
HIC
Rafael, did any of the posters comments help you get what you needed? If so, please be sure to use the Accept as Solution button on the one(s) that helped to let others know what worked and to give credit to the posters.
Regards,
Brett