Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
drew61199
Contributor
Contributor

Create new 'measure' in load script between two tables

I have two tables with time values and need to calculate the variance between the two times (OPEN_TIME and OPEN). I'm able to combine the two tables into a singular table (DATA) as I believe this is necessary. I'm not sure how to proceed from here though. As you can see in my snip I originally tried inserting it in the last LOAD, but I assume b/c the table isn't "finalized", OPEN_TIME isn't found as it's still technically in DATA and the two tables are not fully joined at this point in time?!? 

So I then tried adding another load to add the calculation and although it doesn't fail, the dimension VARIANCE does not populate in my dashboard. 

FYI - I am able to calculate VARIANCE utilizing the formula within the dashboard, but I also need to COUNT the facilities over a certain threshold in minutes and that is not working out for me. So my new plan is create VARIANCE and another dimension (YES / NO based on IF statement) so that I can more easily count that within the dashboard. I'm open to other ideas though from the QLIK pros! Thanks in advance

 

drew61199_1-1644466749942.png

 

 

1 Solution

Accepted Solutions
chris_djih
Creator III
Creator III

On your last join you have to pass a key-field to tell qlik on which field it should join the tables.
at the moment you just telling qlik: Join this new field.
Unfortunately Qlik is not asking or showing an error, that qlik does not know how to join this new field.
Seems as if "UFN" is your keyfield, so your last join would be

 

Left Join(Data)
Load
   UFN,
   Interval( ... - ..) as VARIANCE
resident DATA;

 

If you found help, mark the correct answer and give some likes to ALL contributors, that tried to help.

View solution in original post

2 Replies
chris_djih
Creator III
Creator III

On your last join you have to pass a key-field to tell qlik on which field it should join the tables.
at the moment you just telling qlik: Join this new field.
Unfortunately Qlik is not asking or showing an error, that qlik does not know how to join this new field.
Seems as if "UFN" is your keyfield, so your last join would be

 

Left Join(Data)
Load
   UFN,
   Interval( ... - ..) as VARIANCE
resident DATA;

 

If you found help, mark the correct answer and give some likes to ALL contributors, that tried to help.
drew61199
Contributor
Contributor
Author

Worked perfectly. Thank you!