Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi team,
please let me know the solution If we need the last 10 months latest data in the straight table.
Date | Cases |
1/11/2015 | 26 |
2/11/2015 | 62 |
3/11/2015 | 39 |
4/11/2015 | 63 |
5/11/2015 | 70 |
6/11/2015 | 71 |
7/11/2015 | 82 |
8/11/2015 | 29 |
9/11/2015 | 37 |
10/11/2015 | 18 |
11/11/2015 | 55 |
12/11/2015 | 58 |
1/11/2016 | 8 |
2/11/2016 | 79 |
3/11/2016 | 62 |
4/11/2016 | 77 |
5/11/2016 | 23 |
6/11/2016 | 41 |
7/11/2016 | 26 |
8/11/2016 | 35 |
9/11/2016 | 59 |
10/11/2016 | 13 |
Please suggest
Regards
Hi Nikhil again,
Please see these threads:
https://community.qlik.com/thread/131611
https://community.qlik.com/thread/119789
Or use this expression:
For latest 10 monhts:
=Sum({<Date={">=$(=MonthStart(AddMonths(Max(Date),-10)<=$(=MonthEnd(AddMonths(Max(Date),-1)))"}>} Case)
For latest 25 months:
=Sum({<Date={">=$(=MonthStart(AddMonths(Max(Date),-25)<=$(=MonthEnd(AddMonths(Max(Date),-1)))"}>} Case)
Hope it solved your problema
Thanks,
MB
Also, a friendly advice for you:
Your title and question don't match, next time please take special care
Thanks and have a good Tuesday,
MB
Create the Field MonthYear in script using Monthname function so that expression will become simple
Monthname(Date) as MonthYear
Now write below expression in chart to display last 10 months data
=sum({<MonthYear={">=$(=addmonths(max(MonthYear),-9))<=$(=max(MonthYear)))"}>}Cases)