Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

malfheim
New Contributor

How to count only fields that match?

I'm building a dashboard of a partner network. I am working with the second layer of partners (partner's partners) and only want to show the count of the partners that match people we currently partner with. I currently have a field with all of the partner's partners (with a huge long tail) but I want to only display the count of partner's partners who match my companies partner list.  How can I get it to count/display the partner's that match with a list of my companies existing partners? Thanks!

1 Solution

Accepted Solutions
bwisealiahmad
Valued Contributor

Re: How to count only fields that match?

Hi,

Create a Mapping Table from your companies partner list into the field with all the partners and use that to create a 0 or 1 flag.

Then you can sum that field.

You can read about mapping here:

https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/ScriptPrefixes...

or provide some data like Deepak mentioned above and it should be a quick solution.

Best,

Ali A

4 Replies
dsharmaqv
Contributor III

Re: How to count only fields that match?

can you please provide the sample app and the output you are expecting

bwisealiahmad
Valued Contributor

Re: How to count only fields that match?

Hi,

Create a Mapping Table from your companies partner list into the field with all the partners and use that to create a 0 or 1 flag.

Then you can sum that field.

You can read about mapping here:

https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/ScriptPrefixes...

or provide some data like Deepak mentioned above and it should be a quick solution.

Best,

Ali A

mithilesh17
Contributor

Re: How to count only fields that match?

Dear Matthew,

Please try as below

YOURCompanyData:

Load

.

Your companies partner . as partner

.

.

.

From YOURtable;


partnerspartner:

Load

partner's partner as  partner

.

.

.

From

partner's partner

Where EXISTS(partner, partner's partner)


then it matches.


Regards,

Mithilesh

malfheim
New Contributor

Re: How to count only fields that match?

Thank you all very much for your replys, I ended up resolving my issue using the mapping