Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum if values last year more then 0

Hello,

Could anybody help me with one problem?

I neet to build a pivot table where one of expressions is sum of sales. But I would like to sum up sales in only those units which reported any sales in the corresponding period of the last year. Simply, I would like to sum up sales of stores that worked/existed last year. Should I use set analysis (how) or some fancy 'if' formula?

Thanks in advance,

Marcin

1 Solution

Accepted Solutions
rogerioqv
Creator II
Creator II

Marcin,


See if that helps you:


sum( {$<Sales= {“=Sum({1<Year= {2013}>} Sales) > 0”}>} Sales)

View solution in original post

4 Replies
alexandros17

Sum({$ <year={2013}>} Sales)

this expression sum all sales where year (you need a field year) is equal to 2013

Let me know

rogerioqv
Creator II
Creator II

Marcin,


See if that helps you:


sum( {$<Sales= {“=Sum({1<Year= {2013}>} Sales) > 0”}>} Sales)

View solution in original post

Not applicable
Author

Sum({$<Year={$(=Max(Year))}>} Sales)

Your sales being > 0 I would add a flag in the back end if you want to sum it, does it require aggregation etc?

Not applicable
Author

Rogerio, it seems to be the correct answer to my question. Thanks.