Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
See why BI users voted Qlik #1 in 11 categories. GET REPORT
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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 (3)
1 Solution

Accepted Solutions
Highlighted

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
Highlighted

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)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted

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

Highlighted
Contributor II
Contributor II

Thanks, worked perfectly!