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

How to sum the results of substraction between two columns?

Hello!

I have two columns named 'Created' and 'Terminated date'. I have done the substraction as below :

Load
  [Change ID],
 Date(floor([Created])) AS Created_Date,
  Month(Date(floor([Created]))) as Created_Month,
 Dual('Q'&Ceil(Month(Date(floor([Created])))/3),Ceil(Month(Date(floor([Created])))/3)) as Created_Quarter,
  [Termination date] - Date(floor([Created])) AS Termination_timelapse
 
Resident main;

 

Now, I want to sum the values in 'Termination_timelapse' and show that result through bar chart.

Any idea how to do that?

Thank you very much!

Labels (2)
1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Just use Sum(Termination_timelapse) as an expression and use the required dimension(s).

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

3 Replies
Anil_Babu_Samineni

I would think this way?

Num([Termination date]) - Num(Date(floor([Created]))) AS Termination_timelapse

Then Create Bar Chart

Dimension : Termination_timelapse

Expression : Sum(Termination_timelapse)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
jonathandienst
Partner - Champion III
Partner - Champion III

Just use Sum(Termination_timelapse) as an expression and use the required dimension(s).

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Shafiqur_Khan
Contributor II
Contributor II
Author

Thanks, worked perfectly!