Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Time Duration Calculation issue for plotting Gantt Chart

Hello Everyone,

I have an issue in calculating time taken for activities.

In Qlik app, I am calculating activity wise (field - activity)  time taken (fields - start_date, end_date). For this, I am subtracting activity wise max(end_date) - min(start_date).

But, there is an issue. Certain activities are repeated after certain time. So, the system is calculating time taken for an activity based on max and min date, which is wrong in few scenarios. For example. If an activity1 is done between 18-08-2016 and 25-08-2016, and activity2 is done between 25-8-2016 to 30-08-2016 and activity3 is done 30-8-16 - 2-9-16. Again activity1 is done from 02-9-16 to 8-9-16. In this scenario, for activity1, the system is calculating time taken as 21 days (18-8-16  to 08-9-16), while it should be ; 7 days+ 6 days = 13 days.


Please help me in calculating the time taken properly.


Thank You,


Rahul Krishan Goyal



1 Reply
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

If all those fields are coming from one table then you can find the time taken in script only.

Like below.

Load Activity,EndDate -  StartDate as TimeTaken

From Xyz;

Then all you have to do is put Activity in chart and Expression as Sum(TimeTaken)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!