Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
happyfeet11
Contributor III
Contributor III

rolling months in Qliksense based on time range selection

Hi Friends

 I  have a problem. i would like to generate a list of employees who didnt take any holidays n the last 6 months  based on a current selection /quarter selection but has holidays planned in the present selected quarter and in the future

which means it has to be dynamic. 

how do i do it and please provide videos if anyone has them.

 

thansk for your help and assistance

Labels (1)
3 Replies
edwin
Master II
Master II

what you need are the boundary dates, pretty much the same principle as this post:

https://community.qlik.com/t5/New-to-Qlik-Sense/how-to-calculate-previous-year-sales-till-current-ye...

you change the expressions for the start and end periods you are interested in.

the only difference is that you want one condition ANDed with another condition to combine set analysis modifiers you use <>* <> which is an intersection

edwin
Master II
Master II

a little tweak:

edwin_1-1658861419251.png

 

 

use e function instead. 

the first measure are employees with vacations past 2 quarters,, 2nd are those in the future, third is for employees with future vacations but no vacation in the past 2 quarters.

note that all are controlled by start and end dates.  so with these expressions the challenge is really defining these boundaries. 

from the description above, its not very clear how to define the boundaries, so for proving the logic, these are the  variables (starting with vEndDate):

edwin_2-1658861727424.png

and it computes for the current quarter: vStartDate to vEndDate, 6 months back is v6MonthsPrior, and the future is day after vEndDate

edwin
Master II
Master II

the user selects any date, vEndDate gets the quarterend of the max of the selection.  from v6MonthsPrior to vEndDate is the 6-month period. vFuture is day after vEndDate