Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
baylor2016
Creator
Creator

How to ignore filters in this script?

Dear Friends,

My initial questions was solved by Andrew Walker. Right now I have another problem - how to ignore a filter( date selections) in the script below.

=count(Aggr(if(FirstSortedValue(A1C,-Date#(LABORDERDATE2,'MM/DD/YYYY')) >9,PAT_ID),PAT_ID))

I tried to add {<LABORDERDATE2>} to the script, but it does not work . This method works in other script. Not sure it does not work here.

=count({<LABORDERDATE2>}Aggr(if(FirstSortedValue({<LABORDERDATE2>}A1C,-Date#(LABORDERDATE2,'MM/DD/YYYY')) >9,PAT_ID),PAT_ID)) -- not working

Please refer to the project attached

Thanks

Longmatch

1 Solution

Accepted Solutions
sunny_talwar

Although I would change my expression from Aggr to this

=Count(DISTINCT {$<LABORDERDATE2, PAT_ID = {"=FirstSortedValue({$<LABORDERDATE2>}A1C, -Date#(LABORDERDATE2,'MM/DD/YYYY')) > 9"}>} PAT_ID)

View solution in original post

3 Replies
sunny_talwar

Try this

=Count({$<LABORDERDATE2>}Aggr(If(FirstSortedValue({$<LABORDERDATE2>}A1C, -Date#(LABORDERDATE2,'MM/DD/YYYY')) > 9, Only({$<LABORDERDATE2>}PAT_ID)), PAT_ID))

Give me 5

sunny_talwar

Although I would change my expression from Aggr to this

=Count(DISTINCT {$<LABORDERDATE2, PAT_ID = {"=FirstSortedValue({$<LABORDERDATE2>}A1C, -Date#(LABORDERDATE2,'MM/DD/YYYY')) > 9"}>} PAT_ID)

baylor2016
Creator
Creator
Author

Great, Thanks a million!!!

I would like to learn these tricks of set analysis in Qlik. What is the best way? Do you have books or other tutorials to recommend? I would suggest you to write a book about set analysis with some complicated samples in Qlik.

Thanks as always.

Longmatch