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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Kirsten
Creator II
Creator II

Creating column with calculated measure 2019-2018

How to create an additional column with the delta between 2019 and 2018 through a calculated measure

What should the expression look like. see attachment. I assume the expression needs to be added when you select add under measure fX and fill in the expression

Labels (1)
12 Replies
Kushal_Chawda

try to put in actual expression

let's say Qty Consumed [YTD] has the expression:  Sum(Sales) then your expression will become

=rangesum(-before(sum(Sales)),sum(Sales))

robert99
Specialist III
Specialist III

I don't think you can do this using a pivot table

Use a straight table and put in the relevant measures (6 measures)

 

Two for 2019

Two for 2018

Two for the difference between 2018 and 2019

 

 

 

 

Vegar
MVP
MVP

I might have over complicated things. I assumed you wanted a dynamic calculation diff from previous year using a pivot with year as an dimension. 

If you don't need to have year as an dimension and only need the single comparison between years then you can do something like this.

=Sum({<Year={2019}>}[Consumed YTD]) - Sum({<Year={2018}>}[Consumed YTD])