Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Intervalmatch with intervals

Hello everybody.

I would like to know how i could map this tables:

Production Hist by Machine
Machine ID
Datehour
Partial amount

Worker - Role
Id Worker
Id Role
Worker login datehour
Worker logout datehour

Role - Machines
Id Role
From Datehour
To Datehour
Machine ID

I would like to know production by worker = sum(Partial amount) The roles can change operative machines dynamically and worker can change his/her role dynamically.

Please, i need help.

5 Replies
Not applicable
Author

aggr(sum(partialamount),[worker-role]))

Anonymous
Not applicable
Author

Incorrect.but thanks

I need Partialamount with machine dates between worker login and logout and the same time between role-machine from and to dates

whiteline
Master II
Master II

Hi.

You can link Production history and Roles using  Machine ID, From Datehour, To Datehour, Datehour. It's an advanced intervalmatch case with a key field (refer to the help).

Using that linktable you can get the relation between Id Role and Datehour. Then you can similarly link Workers using  Id Role, Datehour, Worker login datehour, Worker logout datehour.

Now you can draw the scheme and avoid the loop references with some complex keys.

I guess that different workers don't chose the same roles at the same time.

Anonymous
Not applicable
Author

Thanks for your answer,

Workers could chose the same role at the same time.

whiteline
Master II
Master II

So that they can use the same machine at the same time. Then you should decide how the amount of work should be calculated.

Anyway the logic provided above is still applicable.