Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

seowkian
New Contributor

Display records for past 2,3,4 months in Qliksense pivot table

Hi Qlik Sense gura


Wanted to create a dimension/measure to let carpark management in-charge filter for those car park subscribers that didn't utilise the allocated lots in the  past 2, 3 and 4 months

Click on Past 2 months – Display only Staff 2

              Past 3 months – Display only Staff 4 and 6

              Past 4 months – Display only Staff 6


What is the best way to do it in Qliksense space

Thank you !

Message was edited by: Yap Seow Kian Christopher Hi All Updated the excel for illustration what I would like to achieve from Qliksense visualisation Thank you !

5 Replies
Ralf_Heukäufer
Contributor III

Re: Display records for past 2,3,4 months in Qliksense pivot table

Hello you can use an if clause for that but you must watch out by the year change this example must be extended by the conditions arround a year change.

Load

...

if(month>month(today())-2 and Name='Staff2', 'Past 2 Month',if(month>month(today())-3 and Name='Staff4' or Name='Staff6','Past3 Month',if(month>month(today())-4 and Name='Staff6','Past 4 Month'))) as MonthFilter

from...

seowkian
New Contributor

Re: Display records for past 2,3,4 months in Qliksense pivot table

Hi,   attached is only sample of records,  there will be thousand of records and won't know which users will be fall under 2, 3, 4 or 5 months.....

filter.bmp

i.e.  user click on Past 4 Mth,   records with 10,9,8,7  (without data) will be display vise versa

Thanks

YoussefBelloum
Esteemed Contributor

Re: Display records for past 2,3,4 months in Qliksense pivot table

Click on Past 2 months – Display only Staff 2

              Past 3 months – Display only Staff 4 and 6

              Past 4 months – Display only Staff 6


can you explain more ?

when you say "pas 2 months" you always compare with the actual month ?


Ralf_Heukäufer
Contributor III

Re: Display records for past 2,3,4 months in Qliksense pivot table

How looks your table to work with?

seowkian
New Contributor

Re: Display records for past 2,3,4 months in Qliksense pivot table

Hi,  Yes

Community Browser