Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Read about the latest Qlik Community enhancements on the Community News blog!
cancel
Showing results for 
Search instead for 
Did you mean: 
harisri
Contributor
Contributor

Ignore one dimension while doing the count

Hello Everyone,

Good day!!

i have data like below,.

i would like to do count of ID by ignoring the "App ID" column in script level.

For example, in below if i write code has Count(ID) by group by ID then for ID 250,400 i will get count has 2 and for remaining IDs will get count has 1. But here i would like to ignore the App ID column while doing the count then i will get count has 1 for ID 250.

And this i wants achieve without using distinct , because in my data there are some cases where i have same ID for 2 Names (ex:- Id 400).

Request you to help and let me know if you need any other information

IDNameAPP ID
250Hari102
250Hari105
350Sai103
400Sat104
400Sham109
2 Replies
GaryGiles
Specialist
Specialist

Not sure that I totally what you are asking.  Some of it depends on how you are going to use the count and what other dimensions are involved, but you may want to start with including the Aggr() as part of  your expression.  Something like this:

=count(aggr(count(ID),Name))

andykrst
Contributor III
Contributor III

if in script level you mean in a load script,

why not you just count distinct the name then, or

usually ID should be Unique , or at least you can create a new ID with concatenating ID and Name , and count distinct that new ID..

 

hope this help. . 

 

 

AK