Qlik Community

Ask a Question

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
March 11, 2PM EST: Do More with Qlik - Getting Started wtih Qlik Sense SaaS - Redux. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
vsabbise
Creator
Creator

Ignore All filters except the condition

Hi,

I am trying to come up with the count of Id's with a condition. I used set analysis to specify the condition and used {1} to make the expression reflect static count without any effect on the filters but the count still changes when ever there is a change in the filters.

=count(distinct {1< OS_id=p(Si_d)>} OS_id )

Is there a way to make the above expression always reflect static count irrespective of filters selection ?

1 Solution

Accepted Solutions
sunny_talwar

May be try this

=Count(DISTINCT {1<OS_id = p({1} Si_d)>} OS_id)

View solution in original post

9 Replies
sunny_talwar

Try this

=Count(DISTINCT {1<OS_id $::Si_d>} OS_id)

vsabbise
Creator
Creator

Thanks. It says error in expression. Not sure what's missing

sunny_talwar

My bad, I forgot the equal sign... try this

=Count(DISTINCT {1<OS_id = $::OS_id>} OS_id)

vsabbise
Creator
Creator

Sorry This is not what I wanted. I need to display the count of all OS_id that have Si_Id in them without being effected by any filter. Your expression results the count only when I select a specific OS_id.

sunny_talwar

What exactly do you mean when you say OS_id that have Si_Id in them? Can you share an example?

vsabbise
Creator
Creator

lets say Si_id have {1,2,3,9} & OS_id have { 1,2,3,4,5,6,7}. The expression should return 3..

sunny_talwar

May be try this

=Count(DISTINCT {1<OS_id = p({1} Si_d)>} OS_id)

View solution in original post

vsabbise
Creator
Creator

Perfect.This worked.

Thanks a lot. So looks like I need to put {1} to the section which I want to be masked.

sunny_talwar

So looks like I need to put {1} to the section which I want to be masked.

Masked? I am not sure what that means , but essentially p() function needs to ignore selection as we well, otherwise selection will alter Si_d which will impact your final result