cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ashmeet50
Frequent Visitor

Merging two column charts together

Hello Everyone,

I have made 2 column charts and both of them have different data sources.

Age groups and Reference numbers are different in both the cases.

How can I merge these two graphs where the values on the x axis remain the same and I can see the data like this pictureimage31.png 

 

Untitled.png

2 ACCEPTED SOLUTIONS

Accepted Solutions
Microsoft v-yulgu-msft
Microsoft

Re: Merging two column charts together

Hi @ashmeet50,

 

New a calculated table:

TB3 =
UNION (
    ADDCOLUMNS ( TB1, "Legend", "Source1" ),
    ADDCOLUMNS ( TB2, "Legend", "Source2" )
)

Then, create group bins based on [Age] in "TB3".

 

3.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Microsoft v-yulgu-msft
Microsoft

Re: Merging two column charts together

Hi @ashmeet50,

 

Above error is caused by typing the DAX formula into a measure.

1.PNG

 

What you need is a calculated table as highlighted in below screenshot.

2.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Andre_Maciel
Frequent Visitor

Re: Merging two column charts together

You need to create a relationship between this two tables, what is your key field? Maybe you will need to create a auxiliar table, with a distinct list of this key value and then connect this two tables to a new auxiliar table.

 

Show some example of this data, it will help us to demonstrate.

ashmeet50
Frequent Visitor

Re: Merging two column charts together

For eg. I have 2 data sets such as

Reference numberAge
xyz12323
ery 24556
asd4545667
vsvc565634
gsfxgvd4545678
asdas34
dsad56
fghfh568

 

and

 

Reference numberAge
ffe533
edf545
eeq5454
qeqe234
ew768
asasas567
e789
sasewd433

 

And the way I am doing right now is

Untitled1.pngUntitled2.png

Microsoft v-yulgu-msft
Microsoft

Re: Merging two column charts together

Hi @ashmeet50,

 

New a calculated table:

TB3 =
UNION (
    ADDCOLUMNS ( TB1, "Legend", "Source1" ),
    ADDCOLUMNS ( TB2, "Legend", "Source2" )
)

Then, create group bins based on [Age] in "TB3".

 

3.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

ashmeet50
Frequent Visitor

Re: Merging two column charts together

Hello Yuliana,

I am getting an error message

The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.

 

Ashmeet Singh

Microsoft v-yulgu-msft
Microsoft

Re: Merging two column charts together

Hi @ashmeet50,

 

Above error is caused by typing the DAX formula into a measure.

1.PNG

 

What you need is a calculated table as highlighted in below screenshot.

2.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors