Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikfresh
Contributor III
Contributor III

Ignore A Specific Filter - Set Analysis

Hi All

I am looking to ignore a status filter using set analysis to calculate Today minus the earliest date of a specific test in my dataset

 

The formula I am using currently is:

=Today()-Min({$<PROCESS_STEP={"C/D & DS - Filtered Drug Substance"}>}DATE_SAMPLED)

This formula is working as expected until I filter for pending samples RESULT_STATUS<>'Authorised'

Is it possible to ignore the RESULT_STATUS field within my formula ? 

 

Thanks in advance as always! 😀

2 Solutions

Accepted Solutions
tresesco
MVP
MVP

To ignore a field selection you have to include it in the set analysis like:

=Today()-Min({$<RESULT_STATUS=, PROCESS_STEP={"C/D & DS - Filtered Drug Substance"}>}DATE_SAMPLED)

View solution in original post

qlikfresh
Contributor III
Contributor III
Author

@tresesco  better late than never, I forgot to update the thread

You are correct - RESULT_STATUS= will ignore that selection, however my filter pane contained an IF statement which is why the status was not being ignored. Simply calling out the IF statement in the load script mitigates this 🙂 Thanks !

View solution in original post

9 Replies
tresesco
MVP
MVP

To ignore a field selection you have to include it in the set analysis like:

=Today()-Min({$<RESULT_STATUS=, PROCESS_STEP={"C/D & DS - Filtered Drug Substance"}>}DATE_SAMPLED)

qlikfresh
Contributor III
Contributor III
Author

Hey @tresesco , thanks for your response 

Yep, had tried the = method previously and it looks like even when I have that in the formula it still takes RESULT_STATUS in to consideration

The criteria for the filter is

=if(RESULT_STATUS = 'Authorised', 'View Authorised Samples', 'View Pending Samples')

When view pending is selected the calculation seems to return "-". but when unselected the correct number returns

Please let me know if you have any other suggestions! 

 

tresesco
MVP
MVP

Have you created another field with the above condition? Sorry, I didn't get your filter criteria section. Are you selection from another field or calculated dimension?

qlikfresh
Contributor III
Contributor III
Author

Hey,

=if(RESULT_STATUS = 'Authorised', 'View Authorised Samples', 'View Pending Samples')

Is one of the filter panes on the dashboard, when view pending is selected my formula returns "-", otherwise the formula works as expected

 

tresesco
MVP
MVP

If your expression is as simple as you showed above, i.e. - there is no other aggregation function involved there - it should work and ignore the field selection. I guess, there is something that is not clear or not explained. Could you share a sample app that shows the issue?

qlikfresh
Contributor III
Contributor III
Author

Hi @tresesco  sorry i might be unclear in what I am saying 

I think there is an aggregation function as I am using Min in my formula 

=Today()-Min({$<PROCESS_STEP={"C/D & DS - Filtered Drug Substance"}>}DATE_SAMPLED)

i.e. Today minus the earliest filtered drug substance date sampled

 

When no filters applied on the dashboard - everything working as expected 

When filtering by RESULT_STATUS; if there is no filtered drug substance items pending - returns "-"

 

Need to ignore the RESULT_STATUS selection i.e. still return

Today minus the earliest filtered drug substance date sampled

Even when pending is filtered

Thanks!

 

qlikfresh
Contributor III
Contributor III
Author

Hey @tresesco , from searching online it looks like what you said is the only solution I can find to ignore a filter selection - if you can think of any workarounds in the meantime let me know.

One thing I could think of would be to include ALL RESULT_STATUS values, even when pending is selected. Would that be possible ?

Thanks !

tresesco
MVP
MVP

That also could be done. However, I won't go that way. I would suggest you to take the pain of creating a sample qvf file and share. That would take you to the solution in a definitive way.  

qlikfresh
Contributor III
Contributor III
Author

@tresesco  better late than never, I forgot to update the thread

You are correct - RESULT_STATUS= will ignore that selection, however my filter pane contained an IF statement which is why the status was not being ignored. Simply calling out the IF statement in the load script mitigates this 🙂 Thanks !