Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
dnt503
Contributor II
Contributor II

Create an expression to calculate change in tickets year-to-year and % change

Hi everyone, I need help creating an expression for Change in tickets year-to-year and showing the percentage change. Adding table below for reference. Thank you in advance.

 

 

kimdiep503_0-1709665079359.png

 

 

 

Labels (1)
2 Replies
MatheusC
Specialist
Specialist

Hi, @dnt503 

Try working with the function above.

see example:

Value

sum (ticket)
-
Above(sum(ticket))

===============

percentage %
(
sum(ticket)
/
Above(sum(ticket))
)-1

qlik documentation help function above:

https://help.qlik.com/pt-BR/sense/November2023/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/Inter....

Regarts, Matheus

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!
JonnyPoole
Employee
Employee

To do all the logic in the chart you can use the above() function to grab the previous line's value:

Current Row Value:     Sum([Number of Tickets])) 

Previous Row Value:  Above(Sum([Number of Tickets]),1)

Difference:  (Above(Sum([Number of Tickets]),1) - Sum([Number of Tickets])) 

% Difference: 

 

(Above(Sum([Number of Tickets]),1) - Sum([Number of Tickets]))

/

Above(Sum([Number of Tickets]),1)

 

 

JonnyPoole_0-1709667187477.png