Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
KIdriss
Contributor II
Contributor II

Compared to a reference year

Hello,

I would like to know how to compare a value of a year compared to a reference year. The reference year is 2000

I create a Line chart.

- Dimension: colDate.autoCalendar.Year

- Measure:  comparison with the reference year

I added the code below in Measure but I get 0 for each years. 

 

(
	(
  		Sum(colValue) - Sum({<[colDate.autoCalendar.Year] = {"2000"}>} colValue)
	) / Sum({<[colDate.autoCalendar.Year] = {"2000"}>} colValue)
) * 100

 

 

 

 
 

 

 

Labels (1)
1 Solution

Accepted Solutions
jochem_zw
Employee
Employee

Try something like this:

( ( Sum(colValue) - Sum(Total {<[colDate.autoCalendar.Year] = {"2000"}>} colValue))
/
Sum(Total {<[colDate.autoCalendar.Year] = {"2000"}>} traf_aer_pax)) * 100

View solution in original post

2 Replies
jochem_zw
Employee
Employee

Try something like this:

( ( Sum(colValue) - Sum(Total {<[colDate.autoCalendar.Year] = {"2000"}>} colValue))
/
Sum(Total {<[colDate.autoCalendar.Year] = {"2000"}>} traf_aer_pax)) * 100
KIdriss
Contributor II
Contributor II
Author

Hello, thank for your help.