Qlik Community

Ask a Question

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
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
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

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

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

Let me know

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

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

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