Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Displaying many to many in a scatter graph

If one has a many to many relationship, is it possible to represent that on a scatter graph? 

Namely, If each "A" has many "B"s and each "B" has many "A"s, would it be possible to show all the "A"s on a graph, and when the user clicks on an individual "A" then display all the "B"s associated with that "A."  Likewise, if the user then clicked on one of the "B"s could all the associated "A"s be displayed that are associated with that "B?"

5 Replies
whiteline
Master II
Master II

Hi.

The short answer is yes.

You should create a table with rows that represents the points of each relation between "A" and "B".

So each point (row) should have unique "ID", "point type" (A-point or B-point), and "relation ID" (to connect two points in relation). Also there should be some measure info (fields) to calculate the position of each point on scatter chart.

In the end, create a scatter chart with dimensions: "relation ID" and  "point type" as dimension and appropriate expressions for x and y coords.

Not applicable
Author

Don't think I follow.  Each row has an "A" field and a "B" field.  It is simple enough to add a unique id as another field (such as a concatenation of the "A" and "B" fields).  Also each row has a sales figure (x axis value) and a margin percentage (y axis value).  I'm not sure what you mean by "relation ID" or what it should look like.

If it matters, each "A" "B" combination can occur only once.

whiteline
Master II
Master II

... would it be possible to show all the "A"s on a graph, and when the user clicks on an individual "A" then display all the "B"s associated with that "A."

Maybe, I missunderstand you.

Could you explain a bit more what are you trying to achive, and what such a scatter chart should look like ?

Not applicable
Author

Each row has a vendor name, a type (online vendor, vendor in our stores, or both) and a corresponding sales amount and profit margin.  If there were 10 vendors, then there would be up to 30 combinations.  The graph would originally show all thirty points.  If a particular point were clicked on, the graph would then display up to three points corresponding to that particular vendor.  (It might only be one point, if for example, that vendor only sold in our stores, but not online.)  The user can mouse-over to get the particulars.   If the user then clicked on one of those three points (types), all the vendors for that particular variety (online, store or both) would then display.

whiteline
Master II
Master II

First, I didn't realise how do you want to show one to many relationship (the original question).

If the graph shows all thirty points - it's a regular scatter chart (with sales and margin along the axis as expressions and a calculated dimension that joins vendors and types).

Second, If a particular point is clicked, QlikView performs selection according to the dimension values of that point. To allow the user select vendors or types you have to add separate listboxes.

Of course, there is field triggers to perform the behavior as you described (when a particular type is selected and the single vendor is selected then clear the vendor selection). But it's tricky and not obvious for the end user, I think.