Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Need Current Selection - 1

Hi, I need an expression to take the current selection and minus one. For example, if Fiscal Year 2018 is selected, I need the expression to automatically - 1 to 2017. If 2016 is selected it would show 2015 etc.

if(GetCurrentSelections([Fiscal - Year]),

Sum({$<[Fiscal - Year]=GetCurrentSelections([Fiscal - Year]-1)>}

[Amount - Shipped/Fulfilled USD]),

This is what I tried, but its not working. Any assistance would be great

2 Replies
niclaz79
Partner - Creator III
Partner - Creator III

Hi, try this:

Sum({<[Fiscal - Year]={$(=Max([Fiscal - Year])-1)}>}[Amount - Shipped/Fulfilled USD])

Digvijay_Singh
MVP
MVP

May be this -

if(GetSelectedCount([Fiscal - Year]),

Sum({$<[Fiscal - Year]={$(=Max([Fiscal - Year])-1)}>}[Amount - Shipped/Fulfilled USD]))