Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
ciaran_mcgowan
Partner - Creator III
Partner - Creator III

Section Access between two dates

Hi all,

I know there are better ways to do this but I want to make absolutely sure that it can't be done this way before saying no to a client.

Is it possible to combine Section Access and Interval Match? As in, only show a user's data to a manager if they were a member of a team between 2 (employee project start and end date)?

Thanks

1 Solution

Accepted Solutions
kuba_michalik
Partner - Specialist
Partner - Specialist

Precisely. You'd have to convert the HR table to closed intervals (with start and end date; current assignment will need end date like 9999/12/31), because Interval Match requires those, run Interval Match against EmployeeID and Date in the fact table, join ManagerID to result of Interval Match by EmployeeID and start + end date, and then finally you'd end up with a data model like this:

2016-12-12 11_36_15-C__Users_mija_Desktop_tmp.qvw.png

If the fact table is huge, then this Interval Match will surely take its time to process, but otherwise I don't think it's all that clunky.

View solution in original post

4 Replies
kuba_michalik
Partner - Specialist
Partner - Specialist

I think it should be possible. Section access is pretty flexible because you can put whatever bridge tables you need between authorization definition table and the actual data.

That said, based on your description I don't really get what fields would go in your authorization definition table and what are they supposed to relate to in the data, so it's hard to give any specifics.

ciaran_mcgowan
Partner - Creator III
Partner - Creator III
Author

Hi Jakub,

Thanks for the reply. The client is looking to use Qlikview in such a way that Managers will be able to view their team's data for the period they worked on that team.

The only information stored is the team member's ManagerID, their job title and their start date for that team/job title. If anything changes (job title, team or Manager ID, a new record is created. They want to position it so that if a user rolls off that team, the manager won't lose site of their data. So section access would look at each record for an employee ID and the record date. Then query a HR table to see what team they were on and who was manager of that team at the time the record was inputted to the database.

If this were to work, I would need to generate a table with the information in the HR table but also scan the table again for each employee's end date for that position (i.e. the start date of the next entry in the HR table), then create a bridge table and use IntervalMatch to join that to Section Access?

That seems like it might be more hassle than it is worth if it is do-able, especially when dealing with millions of transactions in the QV application. I think there is a better way but I need to make absolutely certain before go back to the client and say that this approach is too clunky and not a very efficient way of doing things.

kuba_michalik
Partner - Specialist
Partner - Specialist

Precisely. You'd have to convert the HR table to closed intervals (with start and end date; current assignment will need end date like 9999/12/31), because Interval Match requires those, run Interval Match against EmployeeID and Date in the fact table, join ManagerID to result of Interval Match by EmployeeID and start + end date, and then finally you'd end up with a data model like this:

2016-12-12 11_36_15-C__Users_mija_Desktop_tmp.qvw.png

If the fact table is huge, then this Interval Match will surely take its time to process, but otherwise I don't think it's all that clunky.

ciaran_mcgowan
Partner - Creator III
Partner - Creator III
Author

Hi Jakub,

Thank you for the advice! I'll mock up a couple of different approaches (including this) and present all options to the client. Glad to know that this can be achieved and isn't too clunky!