Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

baarathi
Contributor II

I want to get the count of id, grouping by id and date(if a same id is present in same date n times it should be considered as 1 count) whereas the same id can be in n different dates, then the count is n.

Aggr(Count({<Amount = {">0"}, A = {"0*"} , A -= {"0000*"}>}Id) ?

5 Replies
agigliotti
Honored Contributor II

Re: I want to get the count of id, grouping by id and date(if a same id is present in same date n times it should be considered as 1 count) whereas the same id can be in n different dates, then the count is n.

maybe it's simple as Count( {<Amount = {">0"}, A = {"0*"} , A -= {"0000*"}>} Distinct Id & Date ) ?

baarathi
Contributor II

Re: I want to get the count of id, grouping by id and date(if a same id is present in same date n times it should be considered as 1 count) whereas the same id can be in n different dates, then the count is n.

distinct id, for a particular day, is fine(it will give single count). But for different days it should be treated as another count

Re: I want to get the count of id, grouping by id and date(if a same id is present in same date n times it should be considered as 1 count) whereas the same id can be in n different dates, then the count is n.

The above should be counting an id on another date as a new observation... have you tried it already?

zebhashmi
Valued Contributor

Re: I want to get the count of id, grouping by id and date(if a same id is present in same date n times it should be considered as 1 count) whereas the same id can be in n different dates, then the count is n.

you can Make a new field hash128(ID, Date) as Newfield and count distinct

agigliotti
Honored Contributor II

Re: I want to get the count of id, grouping by id and date(if a same id is present in same date n times it should be considered as 1 count) whereas the same id can be in n different dates, then the count is n.

yes it does.

Community Browser