Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
amber2000
Creator
Creator

Calculation integer divided by time

Hi Everybody,

I have another small problem with a calculation. (I'm working with Qlikview version 12)

From the source I receive a value in seconds for the field PA_SecondsWorked (I format this to hours in the script and treat it as an interval type)

The second field PL_Nr_Of_Cases contains integer values.

I want to calculate the productivity but it's giving 0 back as result:

[PL_Nr_Of_Cases] / [PA_SecondsWorked]

Somewhere I'm doing something wrong but I don't see it, can any of you help please?

I'm attaching the qvw to see what I've been doing.

Kind regards,

Monique

1 Solution

Accepted Solutions
stigchel
Partner - Master
Partner - Master

Hi Monique,

You need an aggregation function like Sum() because there are two possible values for the one warehouse code so e.g.

Sum([PL_Nr_Of_Cases]) / Sum([PA_SecondsWorked])

View solution in original post

2 Replies
stigchel
Partner - Master
Partner - Master

Hi Monique,

You need an aggregation function like Sum() because there are two possible values for the one warehouse code so e.g.

Sum([PL_Nr_Of_Cases]) / Sum([PA_SecondsWorked])

amber2000
Creator
Creator
Author

Hi Piet Hein,

This does the trick, thanks a lot for the great help.

Kind regards,

Monique