Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
deepakkrish
Creator
Creator

Show Last 3 months of Data

Hi All,

    I want to show last 3 months of sales, I having some fields like

1.Month 1

2.Sales 1

3.Year 1

Once if i select December,  it will shows sales of September,October and November data

1 Reply
sunny_talwar

Do you have date field? I think it would be the best to work with a date field. In case you don't have one, you can always create it in the script using your month and year fields.

Date(MakeDate(Year, Month, 1)) as Date

Once date is created, use a expression like this:

Sum({<Date= {"$(='>=' & Date(AddMonths(Max(Date), -3)) & '<' & Date(Max(Date)))"}>} Sales)