Qlik Community

New to Qlik Sense

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

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
elie_issa
Creator II
Creator II

Filter Issue while using ABOVE Function

hi all,

Please i am having problem with the below expression while filtering on a specific business unit

above(FirstSortedValue(distinct [Business Unit],-[Assignment SDate]))

This expression is working fine in case we are not filtering any business unit.

The purpose of my expression is to get the previous business unit.

Any idea how to solve this issue.

Thanks.

12 Replies
OmarBenSalem
Partner
Partner

This is what I have :

Capture.PNG

Last : =aggr(FirstSortedValue({< BusinessUnit>}distinct BusinessUnit,-AssignementDate),EmployeeNumber)

Before Last : aggr( above(FirstSortedValue({< BusinessUnit>}distinct BusinessUnit,-AssignementDate)) ,EmployeeNumber,AssignementDate)

Capture.PNG

If I select SCTT :

Capture.PNG

View solution in original post

elie_issa
Creator II
Creator II
Author

it's working fine. thanks a lot for your effort.

The only problem for me now is in the security.

OmarBenSalem
Partner
Partner

For that, creating a table with Last and Before in the script would be a better approach I think.

Don't forget to mark the helpful and correct answers as so.

Have a nice day