Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
Can any one help me on this topic...,
I have a data like below,
Year, MonthName, Sales
2016, Jan, 1000
2015,Dec, 570
2016, Feb, 300
Based on the above example, I have a filters called YEAR, MONTH, If i select JAN Month and 2016 year, i want to see the Dec 2015(Previous month) Sales, Can you please help me how i need to write set analysis for this...
If possible kindly send me the QlikSense file
See attached qvf
Hi,
Yes its possible, Try below Code.
Data:
Load *,Date(Date#(Year&'/'&MonthName,'YYYY/MMM')) as Date Inline [
Year, MonthName, Sales
2016, Jan, 1000
2015,Dec, 570
2016, Feb, 300
];
Now you can use beow expression to get previous month data.
Sum({<Date = {"$(=Addmonths(Max(Date),1))"},MonthName=,Year=>}Sales)
Regards,
Kaushik Solanki
Hi Gysbert,
Thanks a lot.. Based on your formula.. my report is working..