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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
amien
Specialist
Specialist

interval question

i have a table that looks like this:

empID, start, end, function

it gives of every empID a start and end date of a certain function/job (human resources data).

each empID can have more than one row ofcourse.

i have a master calender.

now i create a list of all unique empID with a min and max on start and end date.

now i do a intervalmatch:

INTERVALMATCH (DatemasterCalender)
LOAD min(start), max(start)
RESIDENT EmpTableFromAbove;

now i can create for each day a nice bar chart and i know how many people are employed that day or year.

this all works .. but now i want to do a selection on function. and i get an empty bar chart.

should i put the interval match on the original start and end values? how can make a selection on a certain function and that i will only see the active employees on each day/year for that specific function?

1 Solution

Accepted Solutions
amien
Specialist
Specialist
Author

i solved this by putting the dimensions of the interval match into the linked table. my listboxes are now on the dimensions in the linktable

View solution in original post

7 Replies
pljsoftware
Creator III
Creator III

Hi,

do you want a Gantt chart (Timeline)? Look this http://community.qlik.com/media/p/111449.aspx

------------------------------------

Luca Jonathan Panetta

PLJ Software

amien
Specialist
Specialist
Author

thanks for your reply,

No, more looking like this (see attachement)

i have this in my script:


facts:
LOAD
%Werknemer_Key,
FunctionName,
StartDate,
EndDate,
1 AS counter
RESIDENT.....

INNER JOIN (facts)

INTERVALMATCH (%Datum_Key) // comes from my master calender
LOAD StartDate, EndDate
RESIDENT facts;


DROP FIELD %Datum_Key FROM facts;


this will give me the result in the screenshot (bar chart en sum on the counter), but when i select a functionname or date from the mastercalender, the results will no shown. the bar chart will get empty with dates on the bottom and i will see just 1 big bar chart with a "-" under it. When i supress null values it will be empty.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I don't think you should be dropping %Datum_Key FROM facts. You need it for the linkage between facts and calendar.

amien
Specialist
Specialist
Author

Rob,

Thanks for your reply. But than i have a interval table that links to 2 tables. one is the fact table, the other one is the calender table.

Qlikview will loosely couple them and it will result with no date at all on the bottom and the counter is way too much

amien
Specialist
Specialist
Author

ok .. i linked it to the master calender only and then used a listbox with functioname from the interval table. This works!

But, i rather work with the original functionname table instead of two seperate functioname listboxes.

the problem is ofcourse that the intervalmatch table contains a functionname per employee per date. and the original table contains only functionname per employee with a date range.
so my question is, how can i link this?

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I'm not sure I understand, but I think the solution is to match the function table to the calendar. The function table is the only table that should have the interval. If you have further questions, could you please post a Ctl-T table view to help us understand?

amien
Specialist
Specialist
Author

i solved this by putting the dimensions of the interval match into the linked table. my listboxes are now on the dimensions in the linktable