Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Latest 25 MOnths data in straight Table

Hi team,

please let me know the solution If we need the last 10 months latest data in the straight table.

  

DateCases
1/11/201526
2/11/201562
3/11/201539
4/11/201563
5/11/201570
6/11/201571
7/11/201582
8/11/201529
9/11/201537
10/11/201518
11/11/201555
12/11/201558
1/11/20168
2/11/201679
3/11/201662
4/11/201677
5/11/201623
6/11/201641
7/11/201626
8/11/201635
9/11/201659
10/11/201613

Please suggest

Regards

3 Replies
miguelbraga
Partner - Specialist III
Partner - Specialist III

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

miguelbraga
Partner - Specialist III
Partner - Specialist III

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

Kushal_Chawda

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)