Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Rdouto
Contributor II
Contributor II

How to bind two sources of data?

Hello,

I need to create a pie chart and I would like this pie chart to represent the distribution of the number of supplier according to their "category".

Example of distribution : 

Rdouto_0-1598878866415.png

I have projects. These projects have a supplier. And the suppliers have a category (example : challengers, globals etc.)

My first source of data is : all the projects with the name of the suppliers

My second source of data is : the list of supplier with their category (not all supplier have a specific category)

How can I build the pie chart? How and where I link the two data base?

I hope it is clear and that you can help me,

Thank you

7 Replies
Usama
Creator
Creator

Hi,

First, You have to use Mapping load function to map the values.
After mapping the values you can create pie chart. 
For Pie Chart:-
Dimension: Category

Measure: Count(SupplierID)

If it works then ok, otherwise please share the sample data.

Thanks

 

From Nothing - To Something - To Everything
Kushal_Chawda

You can link both the source on SupplierID. Then you can create the pie chart with Dimension category and below expression

=Count(SupplierID)/count(total SupplierID)

martinpohl
Partner - Master
Partner - Master

Your question:

How and where I link the two data base?

My answer:

in the script. Qlik Sense is linking two tables by naming a field in both tables within the same name.

In your example supplier.

If it is difficult, rename for example

[Supplier Description] to {Supplier Name]

Regards

Rdouto
Contributor II
Contributor II
Author

Thank you for your answers. 

What I did : 

For the first source: (I just murged 3 different fields)

Rdouto_1-1598880728179.png

For the second source:

Rdouto_2-1598880758114.png

For the pie chart : 

Rdouto_3-1598880976226.png

If you want some samples : 

First source : 

Rdouto_4-1598881183899.png

And I can't show you the second source of data.

I have a pie chart but it not correct... Maybe the issue comes from the fact that I need to write somehere "distinct [Project Name]" because I have used the function SubField (I have cells with several values).

Thank you for your help

Rdouto
Contributor II
Contributor II
Author

Oh... I think I made a mistake regarding : 

Rdouto_5-1598882714927.png

It does not work like I want ! Actually I want to gather all the values from the 3 different fields, in one field 

martinpohl
Partner - Master
Partner - Master

Thats another view to the datas.

If you are merging all three vendor fields, you won't have a similar value in supplier table.

load

[Project Name],

[Supplier Name 1] as [Supplier Name]

from Yoursource;

 

load

[Project Name],

[Supplier Name 2] as [Supplier Name]

from Yoursource;

 

load

[Project Name],

[Supplier Name 3] as [Supplier Name]

from Yoursource;

 

Rdouto
Contributor II
Contributor II
Author

Thank you for your answer @martinpohl, it is working ! 

however I still have an issue regarding the pie chart. The link between the two sources is still not done I think... I don't know how to do. 

Have you got an idea?