Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
Showing results for 
Search instead for 
Did you mean: 

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

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)