Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

testing if sum of rows = 0 then sum

Hi all!

I don't know how to search for my specific problem. I have to make some charts about inventory. I need quantity and price for every week in the past, since january. The problem is with price because summing the quantity is 0 but summing the price is not. How can i do something like

    sum(if(sum(quantity)=0, 0, price)).

Its aggregation in aggregation, is there any chance for this?

Sorry for my poor enlglish, maybe its understandable.

Thanks in advance!

1 Solution

Accepted Solutions
Highlighted

try:

if(sum(quantity)=0, sum(price), sum(quantity))

View solution in original post

2 Replies
Highlighted

try:

if(sum(quantity)=0, sum(price), sum(quantity))

View solution in original post

Highlighted
Not applicable

if(sum(quantity)=0,0,sum(price)) did the trick, Thank you!