Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
cfountain72
Creator II
Creator II

Aggr exclude zero results

Hello, 

I am using the AGGR function, but want to exclude values where the results of the calculation is zero.

=avg(aggr(count(distinct CSN), DateSK))

So, for DateSK's that have 0 CSN's, I want them to be excluded from the aggregation.

Any suggestions?

Thanks in advance,

Chris

Labels (5)
1 Solution

Accepted Solutions
BrunPierre
Master
Master

Avg(Aggr(Count({$<DateSK=E({1<CSN={'0'}>})>}DISTINCT CSN),DateSK))

View solution in original post

4 Replies
BrunPierre
Master
Master

Avg(Aggr(Count({<DateSK={">0"}>}DISTINCT CSN), DateSK))

cfountain72
Creator II
Creator II
Author

Thank you Peter. But this solution only exclude dates that equal 0, not the distinct count of CSN's on a given date.

BrunPierre
Master
Master

Avg(Aggr(Count({$<DateSK=E({1<CSN={'0'}>})>}DISTINCT CSN),DateSK))

cfountain72
Creator II
Creator II
Author

Thanks Peter!