Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Talk to Experts, a LIVE Q&A Webinar. Bring your Qlik Sense Business questions on Aug. 4th. Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

Display last 6 month by selecting a month in filter pane Qlik Sense

Hi,

I have 24 months data(2018 & 2019), Need to create a pivot table.

Dashboard should display last 3 months data and if i select a month 2019-march, dashboard should display 2019-march,2019-Feb,2019-Jan. If i select 2019-Jan,dashboard should display 2019-Jan,2018-Dec,2018-Nov.

How to achieve this.

Dimension:

Product

S_date

Metric:

Revenue

Thanks in advance 🙂

12 Replies
Highlighted
Creator II
Creator II

Hi channa,
I tried with your syntax , but when i am selecting month in filter pane, i am not getting result of 3 months from selected month.
Highlighted
Specialist III
Specialist III

In my expression change today() to max(date) 

Channa
Highlighted
Contributor III
Contributor III

Hi,

 Try by using below expressions

Dimension:

     Product

Measure: 

    Sum ({< YearMonth= {">=$(=Date (AddMonths (Date (YearMonth,'YYYY-MMM'),-5),'YYYY-MMM')) <=$(=Date (YearMonth,'YYYY-MMM'))”}>} Revenue)

Column Condition:

    aggr(only({<YearMonth={">=$(=date(monthstart(addmonths(YearMonth,-5)),'YYYY-MMM'))<=$(=date(YearMonth,'YYYY-MMM'))"}>}YearMonth),[YearMonth])

 

I haven't used max function in date fields, by using max function I am always getting (max month -6) month result. But the issue is by using above expression my pivot table showing result as null, so result will be shown only when selecting a month filter pane.

If need to show something when end user opening dashboard, having two options

1)  Setting default bookmark - https://help.qlik.com/en-US/sense/February2019/Subsystems/Hub/Content/Sense_Hub/Bookmarks/set-defaul...

2) Always one selected value - https://help.qlik.com/en-US/sense/February2019/Subsystems/Hub/Content/Sense_Hub/DataSource/select-si...

View solution in original post