Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count based on only 1 selection

Hello,

I have a contract table and want to count the total number of contracts by contract template. But I want to keep this count despite of other filters I apply.

So let's say the count of contract template 'CONTRACT A' =100, I want to keep this 100 when a user filters on other dimensions which would normally lower this number.

I've tried to use Set Analysis but it looks like I have to use specific strings..

Hope you can help.

Regards, Sander

4 Replies
stephencredmond
Luminary Alumni
Luminary Alumni

Hi,

Something like:

COUNT ({1<Contract = {$(=Concat(Contract, ','))} > } Contract)

Regards,

Stephen

Not applicable
Author

Hi Sander,

The expression =count({1} CONTRACT) works for me.

I've attached an example.

Best regards.

Not applicable
Author

Hi Guys,

Thank you both for your replies. The first expression makes my application crash.. Maybe because of the number of records and the complexity of the expression.. The second expression (count({1} Contractnr)) works, it counts the number of contract for each template whatever I select. The only problem is that it keeps showing all the contracttemplates, even when I select one specific template.

Is it possible to use this expression but enable filtering the templates?

Regards, Sander

Not applicable
Author

Hi Sander,

that's possible but it's a little bit complicated also. You have to add all fields into the expression except the Contract, for my example the sentence would be:

=count({$< DATE=, NAME =>} CONTRACT)

This is the only way that I know.

Best regards

Best regards