Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
martyn_birzys
Creator
Creator

Calculate difference since set year

 

 

Hi guys, I need to calculate the increase/decrease every year compared to 2012.

The field expression I am using is:  Sum("Passenger Count")  - Sum({<[Year]={'2012'} >}"Passenger Count")

The result only correctly calculates 2012:  69-69=0. The other years show actual Passenger count, not the increase/decrease. Where am I going wrong with this?

Untitled.png

 

 

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

Try this

Sum("Passenger Count")  - Sum(TOTAL {<[Year]={'2012'} >}"Passenger Count")

View solution in original post

1 Reply
sunny_talwar

Try this

Sum("Passenger Count")  - Sum(TOTAL {<[Year]={'2012'} >}"Passenger Count")