Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

HELP: Count number of companies once in table

Hello all,

I am having a silly problem trying to count different companies in a table.

Imagine that I have a table with the following values

CompanyTypeCompany
BankING Direct
BankBBVA
TelcoTelefonica
InsuranceBBVA
InsuranceSanitas

Note that BBVA appears twice. I need to build a table that counts the distinct companies only once in the whole table. See the desired table:

CompanyTypeCount
Bank2
Telco1
Insurance1*

* I do not want to count BBVA again as it was allready included in the first row.

I had tried many different things using a combination of above and set analysis but I could not make it work.

I will be happy if you can help me to find a solution.

Regards and thanks in advance

20 Replies
Anonymous
Not applicable
Author

After doing some tests, I found one issue. When I select in the table on the top, the value Insurance, it must show in this case the number 2. Because BBVA is not listed in the Bank category as it is not selected.

Regards,

Javier

Not applicable
Author

Hey Javier, Its really interesting. I want to ask why you want BBVA into Bank but not in insurance. Can you please explain

Anonymous
Not applicable
Author

Yes it is.

It is because customer needs. The KPI "# Companies" is very important for them and is is defined like that. It means that the same company cannot be counted more than once in the whole table, even it belongs to several CompanyTypes. It has to be counted only in the first appeareance.

Hope it helps.

Regards,

Javier

Not applicable
Author

Well I got what you want. I am sorry I didn't explain my question. Is it necessary that every company falls in bank first not in insurance?

qlikpahadi07
Specialist
Specialist

Hi Javier,

I have used Bill Application with conditional Expression.

see the Chart in Green Background it will work with Multiple Selections  as well.

Hope this will work

Anonymous
Not applicable
Author

It is no mandatory to fall in Bank first. It is mandatory to fall in the first one that appears in the table, Bank or Insurance. It the table is ordered differently, the row values can be affected... But not the total.

Javier Riera | Director

Tel: +34 916 369 854

Móvil: +34 616 935 130

Keyrus | www.keyrus.es<http://eyrus.es>

El 29/09/2013, a las 17:29, "aamir225" <qcwebmaster@qlik.com<mailto:qcwebmaster@qlik.com>> escribió:

QlikCommunity<http://community.qlik.com/>

HELP: Count number of companies once in table

reply from aamir225<http://community.qlik.com/people/aamir225?et=watches.email.thread> in App Development - View the full discussion<http://community.qlik.com/message/398571?et=watches.email.thread#398571>

Anonymous
Not applicable
Author

Javier

Rohit is getting closer, as in it looks ok for either 1 or all CompanyType 's selected, but not when 2 CompanyType 's are selected.

I think [hope?] I now understand what you after, as in something a bit like a Single Transferable Vote.  Where the load order defines for each Company the preference order of the CompanyType. And the row to be counted for each CompanyType  is most preferred one [and only only that row] for the CompanyType selected.

I make no guarantees, but it looks promising - and is a simpler more elegant solution.

If you test it as ok with your 5 data rows, could you also test it with more data rows just in case some date permutation breaks it.

Best Regards,    Bill

Anonymous
Not applicable
Author

Thanks!

I did some testing and I found that if I select Insurance and Telco, #Companies for insurance must be 2, and it is showing 1 (due the condition you've implemented).

I am still trying... this seems to be a not easy one!

Thanks anyway for your support

Not applicable
Author

Javier,

I'm posting the file again, see if you can open it now. And in this way solves your problem. I used a grouping by company and efetuei counting on this group.

Anonymous
Not applicable
Author

Javier

Have checked out the qvw I posted Sep 30, 2013 12:27 PM ?  It may well be what you are after .

It got well delayed by the moderation ?

Best Regards,    Bill