Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am having a scenario where i am creating two sets SET1 and SET2 from a single table. I would like to perform set intersection on these two sets and i don end up in a result. The intersection does not happen.
I would also like to know some basics about how qlikview handles sets for intersection. Like Whether intersection can only be done on resident objects.
Should an intersection field be definitely used for joining two tables in the design..etc...
Any point regarding this will be more helful on this.
Can anyone help me on this.
Thanks
Hari
I'm not sure I understand the problem or the question. You're doing something like this?
sum({<your first set>*<your second set>} Sales)
And you're NOT getting the intersection of these two sets?
What is your actual expression?
What do you mean by "resident objects"?
What do you mean by an intersection field?
Hi John.
I am sorry if i was not clear with my explanation. Please find attached my sample application.
In the first sheet(Tables Available) I have three of tables.
Table 1: Event - Has got records for an event name(A,B), place of event and the zipcode of th event location.
Table 2: Distance - I have the Distance details for a zipcode with respect to other zipcodes.
Table 3: Distance_Limit - I have created a distance limit for each of the event (For A it is 96 and for B it is 50).
Now i have created two bookmarks Book1 which gives me the details of Other zipcodes for A within its distance limit (i.e 96)
and Book2 giving me the details of the Other zipcodes for B within its distance limit(i.e.50). Please see Zipcodes_Within_Limit table in Sheet2(Main) for this.
Selection to be Made for Book1:
Event_Name = A.
Selection to be Made for Book2:
Event_Name = B
These two Bookmarks have got some Zipcodes in common.
I am looking for these common zipcodes which is present in both the bookmarks.
I have created a table(Intersecting Zipcodes) in Sheet2(Main) with an Intersection Expression, which does not work for me.
Please let me know if you have understood what i am looking for .
Thanks
Hari
Hi,
Try this out.
count({<Other_Zipcodes = p({Book1})*p({Book2}) >}1)
Regards,
Kaushik Solanki
Hi Kaushik,
Thanks for your response. I tried ur expression, but could not find any result. I have used Other_Zipcodes as the dimension and used ur expression. Please let me know if i had tried the right way or not.
Thanks
Hari
Hi,
Yes you did the right thing.
It worked at my side.
Here is an attachment
Regards,
Kaushik Solanki
Hi kaushik,
Thanks for this.
I have a doubt here. For Book1, The Other_Zipcodes Field does not have a value of "100" and for Book2, the Other_Zipcodes field does not have a value of "201". But in the resultant intersection table we have got both 100 and 201 values for the Other_Zipcodes dimension field.
My doubt is, these two codes(100 & 201) doesnt get intersect between the two Bookmarks, but is available in the sheet2 result table.
Please let me know on this.
Thanks
Hari
Hi,
Did you check the sample qvw i have uploaded.
in that you will see the chat in second sheet is having the intersection of both the bookmarks.
i.e the chart do not thave 100,201 rather they have all values from 1 to 20.
Regards,
Kaushik Solanki
Hi Kaushik,
I have re-attached the application you have uploaded. In this i could fine both 100 and 201 zipcodes in the second sheet. Please check this and let me know if i am going wrong somewhere.
Thanks for your help.
Thanks
Hari
Hi,
I have checked, but i cant see the values 201 and 100... i can see only 1 to 20.
Regards,
Kaushik Solanki