Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
jw22
Contributor II
Contributor II

Divide total hours needed to time period

Hello Qlik- Community,

is there a way to devide the needed production hours for a production batch into the planned number of days?

So, for example, i have following table:

 

jw22_0-1705506233072.png

 

For the production "xy" which is planned from 20.02.2024 to 26.02.2024 in total 75 production hours are needed.

Now I want to divide the hours into the single days - should look something like that:

Total needed hours 75 / 7 days = 10,71 hours per day

jw22_3-1705506634731.png

Thank you!

 

 

 

 

Labels (1)
1 Solution

Accepted Solutions
Rohan
Specialist
Specialist

Hi @jw22 ,

Firstly you calculate your daily hours besides your Production Batch itself, by addind a new column :

Production Hours/(Enddate-StartDate) as DailyHours.

Now you have the following columns :

ProductionBatch, StartDate, EndDate, ProductionHours, DailyHours.

xy,20.02.2024,26.02.2024,75,10.71

 

Now you have to use intervalmatch to generate the dates which fall between your specified date range. & you will get each date row from 20th Feb to 26th Feb with 10.71 infront of it as Daily Hours. Then you can simply add these to your Bar Graph. Try it out & let me know if any issues.

 

Regards,

Rohan.

 

 

 

View solution in original post

2 Replies
Rohan
Specialist
Specialist

Hi @jw22 ,

Firstly you calculate your daily hours besides your Production Batch itself, by addind a new column :

Production Hours/(Enddate-StartDate) as DailyHours.

Now you have the following columns :

ProductionBatch, StartDate, EndDate, ProductionHours, DailyHours.

xy,20.02.2024,26.02.2024,75,10.71

 

Now you have to use intervalmatch to generate the dates which fall between your specified date range. & you will get each date row from 20th Feb to 26th Feb with 10.71 infront of it as Daily Hours. Then you can simply add these to your Bar Graph. Try it out & let me know if any issues.

 

Regards,

Rohan.

 

 

 

Anil_Babu_Samineni

@jw22 make sure you have proper calendar script that shows accumulate for all dates. Otherwise, Simply use this.

Sum(TOTAL [Hours needed])

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