Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW
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
Luminary Alumni
Luminary Alumni

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
Luminary Alumni
Luminary Alumni

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!