Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Aggr function including IF statement

Hey all

Wondering if what I'm trying to do is possible.

In the third expression below I would like to count all free units per BIL_ID, but doing so by month. Obviously it works if I replace the Date_MonthYear dimension with BIL_ID... But I would like to see that per month instead.

So, I've tried this expression using the Aggr function, but that doesn't work:

=Aggr(If(Sum(NetRevenue)=0, Sum(Quantity), 0), BIL_ID)

Is it possible to do what I'm trying to do in this way?

Capture.PNG

Thank you for your help!

1 Solution

Accepted Solutions
sunny_talwar

Try this

Sum({<BIL_ID = {"=Sum(NetRevenue) = 0"}>}Quantity)

View solution in original post

2 Replies
sunny_talwar

Try this

Sum({<BIL_ID = {"=Sum(NetRevenue) = 0"}>}Quantity)

Anonymous
Not applicable
Author

That works! Thanks a lot Sunny