Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
everest226
Contributor III

yoy in expression

I have this expression    

sum ([bta Revenue])/sum([T Exp])
 
i have list box field name Year now i want to add extra column in the chart to show -1 year , so if i select 2019 it have to show 2018, and also extra column to show the difference between both year.
so basically expression for two column 
1 Reply
yogiachilleos
New Contributor III

Re: yoy in expression

Howdy Everest,

Try the following for your second column:

sum ({$<Year={$(=max(yearFieldName)-1)}>}[bta Revenue])/sum({$<Year={$(=max(yearFieldName)-1)}>}[T Exp])

Kind regards,

Yogi Achilleos