Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count number of days with positive revenue

Hi,

Trying to wrap my head around this problem, but going in circles.  I'd like to count the number of days of positive revenue for a division drilldown group.  The source data is like this:

DivisionDateAmt
Div 11/1/2012100
Div 11/2/2012-50
Div 11/3/201250
Div 21/1/201225
Div 21/2/2012-10

So the results should be:

DivisionCount days, rev > 0
Div 12
Div 21

I think it has something to do with aggr, but i'm relatively new to QV and haven't come across this thorny of a problem.

Thanks

Justin

2 Replies
villafuerte
Partner Ambassador
Partner Ambassador

Hi,

You're right, you can use aggr to solve this problem.

I've attatched a file where you can find the expression you're looking for.

Hope it helps!

swuehl
MVP
MVP

If you have distinct dates in records per Division, something like

=count( {<Amt = {">0"}>} Date)

could also work.