Skip to main content
Announcements
Save $600 on Qlik Connect registration! Sign up by Dec. 6 to get an extra $100 off with code CYBERSAVE: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Indirect Set Analysis

Hello all,

I need some help on indirect set analysis. I am currently using v9

[ code ]sum(({<Year={$(=max(Year))>}, Customer=p({<Year={$(=max(Year)-1)}>}) Sales)[ /code ]
it should return this year's sales for customers who had sales last year, but I am having syntax error which that I can not find.

Thanks,

Ryan

4 Replies
Not applicable
Author

Hi Ryan,

Here is the code, I haven't actually checked the results but the syntax is correct and presents some figures to check.

As a tip I would always try and get syntax correct using a pivot table and create a second expression with a '1' in the expression.

This means that there is some data always in the pivot table. This allows you to hover over with the mouse, the expression you are trying to get right, a popup is then presented showing the evaluated $ expansion parts of your expression which you may have wrong.

sum({$<Year={$(=max(Year))}, Customer=p({<Year={$(=max(Year)-1)}>})>} Sales)

Hope this is of help,

Neil





timmy
Partner - Contributor III
Partner - Contributor III

what does the P in the formula?

p({<Year={$(=max(Year)-1)}>})>}

Not applicable
Author

P is for Possible you can also use E for excluded

csalcedoa
Contributor
Contributor

Works for me