Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Chandra3
Contributor
Contributor

SHOW ONLY LATEST LAST 3 MONTHS RECORDS ONLY

Hi community 

i am new to qlikview, i want know to show only latest last 3 months records here. can any help 

here i have a example table 

     
NAME DATE SALES
A 01-01-2020 100
B 05-01-2020 200
C 10-02-2020 300
D 20-02-2020 400
E 10-03-2020 500
F 20-03-2020 600
G 10-04-2020 700
H 20-05-2020 800
I 10-06-2020 900
J 20-06-2020 1000

 

but i want to show only this type of results.

G 10-04-2020 700
H 20-05-2020 800
I 10-06-2020 900
J 20-06-2020 1000

 

thanks an advance

1 Solution

Accepted Solutions
dmac1971
Creator III
Creator III

Hey try this:

Load * from Records where Date > MonthStart(Today(),-3);

View solution in original post

3 Replies
dmac1971
Creator III
Creator III

Hey try this:

Load * from Records where Date > MonthStart(Today(),-3);

Chandra3
Contributor
Contributor
Author

HII 

if we want to show sum of sales of last 3 months in a dynamic expression 

SUM({<DATE=  MonthStart(Today(),-3)>}SALES)

or

SUM({<DATE= > MonthStart(Today(),-3)>}SALES)

but both are not give appropriate results.

thanks an advance.

dmac1971
Creator III
Creator III

sum({<MONTH_YEAR = {"$(='>=' & Date(AddMonths(Max(MONTH_YEAR), -2),'MMM-YYYY') & '<=' & Date(Max(MONTH_YEAR),'MMM-YYYY'))"}SALES) will work for you.  Note if you havent implemented a master calendar then you should.  Thanks.