Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Help with a Set expression

Hi

Can someone help me to get a set expression right.

I want to

Count({<Avgorsak ={9} >} Distinct PersonID)      but only for those that dont have a HireDate that are larger than the EndDate

It´s a stright tabel that shows how many people that have ended ther hirings and don´t have come back later.

It´s the ones that have been rehired I want to remove.

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Not applicable

Re: Help with a Set expression

Something like:

Count({<EndDate -= {'9999-12-31'}, Avgorsak ={9},PersonID={"=aggr(max(HireDate),PersonID)<=EndDate"} >} Distinct PersonID)

You may have to use the date# function to make a date of 9999-12-13. The expression editor doesn't understand -= but it's the correct syntax.


talk is cheap, supply exceeds demand
3 Replies
Gysbert_Wassenaar
Not applicable

Re: Help with a Set expression

Perhaps like this:

Count({<Avgorsak ={9},PersonID={"=aggr(max(HireDate),PersonID)<=EndDate"} >} Distinct PersonID)


talk is cheap, supply exceeds demand
Not applicable

Re: Help with a Set expression

I think you are on the right way, but now I fund that people that are still hired are set to 9999-12-31 as enddate. In your above expression, how can I exclude that date?

Gysbert_Wassenaar
Not applicable

Re: Help with a Set expression

Something like:

Count({<EndDate -= {'9999-12-31'}, Avgorsak ={9},PersonID={"=aggr(max(HireDate),PersonID)<=EndDate"} >} Distinct PersonID)

You may have to use the date# function to make a date of 9999-12-13. The expression editor doesn't understand -= but it's the correct syntax.


talk is cheap, supply exceeds demand