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: 
matbelli
Contributor
Contributor

Difference between values of the same column

Hi, i have a column like the one on the left and i need it like the one on the right:

today()-max(Giorno_prec)Delta
101101
1054
1116
1165
1193
1201
1244
13511
1372
1381

 

How can i calculate Delta?

thanks

4 Replies
miguelbraga
Partner - Specialist III
Partner - Specialist III

Hey there,

 

The correct formula is something like this:

 

if(isnull(Sum(F1) - Above(Total Sum(F1))), Sum(F1), Sum(F1) - Above(Total Sum(F1)))

 

Substitute F1 to you field.

 

Please, see the results in the attached file.

Screenshot_1.png

Best regards,

MB

matbelli
Contributor
Contributor
Author

My field was an expression, it was today()-max(Giorno_prec), if i put this instead of F1 it says "Error in expression" how can i fix it?

sunny_talwar

Try this

RangeSum(
(Today() - Max(Giorno_prec)),
-Above(Today() - Max(Giorno_prec))
)

Or this

RangeSum(
(Today() - Max(Giorno_prec)),
-Above(TOTAL Today() - Max(Giorno_prec))
)
amskeith
Contributor
Contributor

This worked for an issue I was having! Just make sure you add both expressions to the chart and everything will calculate as needed. Thank you!