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: 
Shafiqur_Khan
Contributor II
Contributor II

Calculating time duration in Quarters.

Hello!

I am absolutely new to Qlik Sense. I was given this task : 'Display time elapsed between change request receipt (created) and decision taken (terminated) over time (in quarters)'.  And also I have to show the output in Bar chart. Now, I can show the substracted days in the bar chart. But i have to show them in quarter.

 To find out the time duration I did as below in the Data Load Editor :

 

Calculated_Values:
Load
  [Change ID],
  Date(floor([Created])) AS Created_Date,
  [Termination date] - Date(floor([Created])) AS Time_Laps
  
  
Resident Sheet1;

Bar Chart of the time lapseBar Chart of the time lapse

 

but I don't know how to show the result in quarter. What to do?

My source file is a spreadsheet containing three columns : Change ID, Created and Termination Date.

Thank You

Labels (3)
1 Solution

Accepted Solutions
treysmithdev
Partner Ambassador
Partner Ambassador

Try this:

 

Calculated_Values:
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 Time_Laps
  
  
Resident Sheet1;

 

Then use [Created_Quarter] as a dimension in your chart.

Blog: WhereClause   Twitter: @treysmithdev

View solution in original post

2 Replies
treysmithdev
Partner Ambassador
Partner Ambassador

Try this:

 

Calculated_Values:
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 Time_Laps
  
  
Resident Sheet1;

 

Then use [Created_Quarter] as a dimension in your chart.

Blog: WhereClause   Twitter: @treysmithdev
Shafiqur_Khan
Contributor II
Contributor II
Author

Thank you very much!! it worked perfectly!