Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
Every month i extract a list of emplyees, with emplyeID, groupID, age, gender etc. I ad the last date of the month as a timestamp and load thias as a table i QV.
I also extract lists with events, such as absence, hour of traveling, hours of overtime etc. The lists also includes emplyeeID and date, so I can load them to the table of emplyees.
The lists with events don't have age of the emplyee as a varible, so to make a selection based on agegroups for example absence due to sickness I need to match the employeeID with the age from the list of employees.
Mapping load EmplyeeID and Age from the first list and matching them to the other lists works, but then I only get the first value, lets say someone employed 10 year ago. I there a better way to make this work?
Hope you understand what i'm getting at, I'm new to qlickview and right now i'm pretty much working by "trial and error"
Hey Daniel,
As I understand it, the issue you might have in your data is that there might be events (for a person A) for current period, but the age (because of Mapping) could be say 10 years ago. Is that right?
You might have a date in the Events, right? Why not use Intervalmatch() function to assign the correct age to the Events
based on comparison of the dates in the Age table and dates in the Events table?
This would give you the exact results. In case you need help on Intervalmatch, please post a test app and I would be glad to help.
Regards,
SK
Thank you for taking time to answer!
You are absolute right, and I thought about intervalmatch, but I only have one date in the emplyee table. And don't I also need to match it with at least EmpID to get it right?
Se these simplifed exemples. I would like to get a column i the Events table with age. (Bolded)
By mapping I only get 25 on both rows since i maps the first value in the age column.
Can it be done with intervallmatch?
Table employee:
EmpID, Age, Date
1111Daniel, 25, 2014-01-31
1111Daniel, 25, 2014-02-28
1111Daniel, 26, 2014-03-31
Table Events
EmpID, Event, Amount, Date, Age
1111Daniel, Overtime, 2, 2014-01-14, 25
1111Daniel, Overtime, 4, 2014-03-24, 26