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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
silvia_assuncao
Creator
Creator

Error Calculating variation by year

Hi,

I Have a problem when calculating variation between years.

I have 3 charts, Chart 1 and 2 the values are correct, but the chart 3 does not bring right values (value for chart 3 should be the same as chart 2.

Expression for Chart 2

(Sum(if(Year='2015' or Year = '2014' or '2016' ,Actual/1000))
  - (
Above(Total ((Sum(if(Year='2015' or Year = '2014' or '2016' ,Actual/1000))
)),
Count(DISTINCT Total<Year> [Year]))))
 

This is teh expression I'm using: and the result is not right.

(Sum(if(Year='2015' or Year = '2014' or '2016' ,Actual/1000))
  - (
Above(Total ((Sum(if(Year='2015' or Year = '2014' or '2016' ,Actual/1000))
)),
Count(DISTINCT Total<Year> [Company Code]))))

Could you please help me with this?

best regards,

2 Replies
Not applicable

The reason may be you don't have Company_Code in your Dimension list.

silvia_assuncao
Creator
Creator
Author

As a matter of fact, I do thave the Company_Code listed as dimension in chart 3. but the values returned are not correct. values should be the same as chart 1