5 Replies Latest reply: Jan 16, 2018 10:15 AM by Andrea Gigliotti

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) ?

• 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 ) ?

• 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?

• 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.

• 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