

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Count (distinct ..) with 2 parameters
Hi Experts,
I came across an expression in which 2 parameters were passed in the Count(Distinct para1¶2) and I am not pretty sure whether i get it correctly or not, hence would like to hear from the experts on this.
Expression : =count({<[Type]={'Document'}>} DISTINCT ID&[DOC Name])
In the expression above Count (Distinct) is used with 2 parameters i.e. ID and NAME followed by a where condition of Type= "Document".
According to my understanding the above expression is counting number of Distinct ID of respective DOC Name followed by where condition.
Would like to hear from you whether my understanding is correct or not?
Thanks,
Punit
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It counts the Distinct combination of ID and NAME. You can assume of a composite key made of ID and NAME, and the expression gives the distinct count of the key followed by where clause (like you said).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Assume, If we have the same values from those two fields of concatenate it will work as you think.
But,
Load *, [DOC Name] & ID as Key Inline [
ID, DOC Name, Type
1, A, Document
2, B, Document
3, C, Document
1, A, Document1
];
=count({<[Type]={'Document'}>} DISTINCT Key)
Try this from your end on your personal edition.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It counts the Distinct combination of ID and NAME. You can assume of a composite key made of ID and NAME, and the expression gives the distinct count of the key followed by where clause (like you said).
