Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
laylagirl
Contributor III
Contributor III

How to calculate based on current selection ?

Here is expression : sum ( sales) 

Here is dimension : Yr = ( 2015, 2016, 2017)

How do I write expression so it returns values for ANY YEAR selected  minus prior year ?

1 Solution

Accepted Solutions
greeshma_k
Creator III
Creator III

sum({<Yr= {'$(=max(Yr))'}>}sales) - sum({<Yr= {'$(=max(Yr)-1)'}>}sales)

View solution in original post

1 Reply
greeshma_k
Creator III
Creator III

sum({<Yr= {'$(=max(Yr))'}>}sales) - sum({<Yr= {'$(=max(Yr)-1)'}>}sales)

View solution in original post