Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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:
Division | Date | Amt |
---|---|---|
Div 1 | 1/1/2012 | 100 |
Div 1 | 1/2/2012 | -50 |
Div 1 | 1/3/2012 | 50 |
Div 2 | 1/1/2012 | 25 |
Div 2 | 1/2/2012 | -10 |
So the results should be:
Division | Count days, rev > 0 |
---|---|
Div 1 | 2 |
Div 2 | 1 |
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
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!
If you have distinct dates in records per Division, something like
=count( {<Amt = {">0"}>} Date)
could also work.