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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
ilyas_coban
Contributor II
Contributor II

Intersection of two dimensions

Hi all,

I have data like this:

XXX.IDXXX.StartXXX.End
101/01/2000 01:2501/01/2000 02:25
201/01/2000 00:1201/01/2000 01:12
301/01/2000 12:3401/01/2000 14:34
401/01/2000 04:0001/01/2000 05:00

YYY.IDYYY.StartYYY.End
501/01/2000 06:4301/01/2000 09:25
601/01/2000 03:3301/01/2000 09:25
301/01/2000 18:3401/01/2000 19:34
401/01/2000 13:0001/01/2000 15:30
402/01/2000 13:0002/01/2000 15:30

...

And i want to calculate total work hours of person that works at both XXX and YYY departments for each day separately. YYY.ID and XXX.ID are not connected. Is there any way to do this without changing script? Like using calculated dimension or set analysis. I think an intersection like function can solve my problem but i couldn't find anything.

My result should look like this:

ID/Date01/01/200002/01/2000
303:00-
403:3002:30

Best regards,

İlyas

1 Solution

Accepted Solutions
alexandros17
Partner - Champion III
Partner - Champion III

In dimension write If(XXX.Id=YYY.Id, XXX.Id, null())

then suppress Exclude null values checkbox.

In the expression simply sum your values from both tables: sum(valTable1)+sum(ValTable2)

where val ... are your hours

View solution in original post

3 Replies
alexandros17
Partner - Champion III
Partner - Champion III

In dimension write If(XXX.Id=YYY.Id, XXX.Id, null())

then suppress Exclude null values checkbox.

In the expression simply sum your values from both tables: sum(valTable1)+sum(ValTable2)

where val ... are your hours

sujeetsingh
Master III
Master III

Ales is right you can use this as calculated diemsion.

ilyas_coban
Contributor II
Contributor II
Author

Thanks.