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: 
dominicanlauf
Contributor III
Contributor III

"Sum" function ignore duplicate records

Hello everybody,

I have not worked so long with QlikView and need some help!

The point is that I have a machine that sets a timestamp at the beginning of a production cycle and another at the end of the production cycle.

The calculation of the production time per piece thus results from "ENDTIME-STARTTIME" - where ENDTIME and STARTTIME are the respective time stamps.

The problem is that Qlikview contains multiple identical STARTTIME records because of links to junk-related data. However, I would like to ignore these in my calculation because I want to calculate the actual production time of the machine.

My function looks like this:

sum (END_TIME-START_TIME)

But how do I get it now, that is checked first, whether START_TIME contains duplicate values ​​and ignored if necessary. I know that the DISTINCT command offers a possibility, but the problem is that I can not make any changes in the script, but can only do calculations with charts and tables because I lack certain access rights.

Thanks in advance,

Dominic

3 Replies
sunny_talwar

Is these a field/s which uniquely defines a single run? For example a Machine and Date might give you one and only one START and END Time?

dominicanlauf
Contributor III
Contributor III
Author

Lathestat..png


@sunny_talwar wrote:

Is these a field/s which uniquely defines a single run? For example a Machine and Date might give you one and only one START and END Time?


It looks like that. For example: 27.12.2018 12:43:29 - 27.12.2018 12:51:28 There are 2 entries, although only one order was made.

Thanks!

sunny_talwar

How do you know if it was part of the single order? Is it because it has the same exact value?