Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Drew808
New Member

How to show 2 different types of data on a single clustered bar chart

Hello!

Is it possible to show data from 2 different datasets that have their data collected differently on a clustered bar chart?

I have 1 dataset that is:

  • Name of training
  • Email of the person who took the training

Which is easy to work with, simple Object names, and count up each object: 

Drew808_0-1748457016219.png

 

Output

 

Drew808_2-1748457542498.png


But we want to incorporate adding another dataset to this visual, which is simply the name of a training and the number of people who took the training as a whole number:

Drew808_1-1748457379104.png

  • Object Name
  • The number of people who took that training

I've tried throwing stuff into each Y and X axis but I get some wacky results. 

Should I be looking for a different visual to achieve what I want to do? Is there a measure or setting I can change?

My naive approach would be to add the number of objects to the first data set, which seems silly to do, but at least I'd know that work. Any help is appreciated!

1 ACCEPTED SOLUTION
MasonMA
Resolver I
Resolver I

Hi @Drew808 

It would help more if you can share a sample report, but if only based on your descriptions, i would first create one Dimension Table for 'Training'. You can use below DAX in Power BI to create a table.

TrainingList = 
UNION (
    SELECTCOLUMNS(DatasetA, "Training", DatasetA[ObjectName]),
    SELECTCOLUMNS(DatasetB, "Training", DatasetB[ObjectName])
)

 

After this you can connect both datasets to this new 'TraingingList' table. Set both relationships as Many-to-One, single direction.

 

Then create calculated measures for each dataset. 

//Count from Dataset A (emails)
TrainingCtA = 
CALCULATE(
    COUNTROWS(DatasetA),
    TREATAS(VALUES(TrainingList[ObjectName]), DatasetA[ObjectName])
)

//Count from Dataset B (people counts)
TrainingCtB = 
CALCULATE(
    SUM(DatasetB[NumberOfPeople]),
    TREATAS(VALUES(TrainingList[ObjectName]), DatasetB[ObjectName])
)

 

For the cluster chart you were trying to build, now you can add 'TrainingList[ObjectName]' on your Axis, and 'TrainingCtA' & 'TrainingCtB' on the Values. 

 

Thanks

Mason 

View solution in original post

4 REPLIES 4
MasonMA
Resolver I
Resolver I

Hi @Drew808 

It would help more if you can share a sample report, but if only based on your descriptions, i would first create one Dimension Table for 'Training'. You can use below DAX in Power BI to create a table.

TrainingList = 
UNION (
    SELECTCOLUMNS(DatasetA, "Training", DatasetA[ObjectName]),
    SELECTCOLUMNS(DatasetB, "Training", DatasetB[ObjectName])
)

 

After this you can connect both datasets to this new 'TraingingList' table. Set both relationships as Many-to-One, single direction.

 

Then create calculated measures for each dataset. 

//Count from Dataset A (emails)
TrainingCtA = 
CALCULATE(
    COUNTROWS(DatasetA),
    TREATAS(VALUES(TrainingList[ObjectName]), DatasetA[ObjectName])
)

//Count from Dataset B (people counts)
TrainingCtB = 
CALCULATE(
    SUM(DatasetB[NumberOfPeople]),
    TREATAS(VALUES(TrainingList[ObjectName]), DatasetB[ObjectName])
)

 

For the cluster chart you were trying to build, now you can add 'TrainingList[ObjectName]' on your Axis, and 'TrainingCtA' & 'TrainingCtB' on the Values. 

 

Thanks

Mason 

Hi @Drew808 ,

If the information posted by @MasonMA   is helpful, please accept the answer by clicking the "Upvote" and "Accept Answer" on the post. If you are still facing any issue, please let us know in the comments. We are glad to help you.

We value your feedback, and it will help us to assist others who might have a similar query.

Thank you for your contribution in enhancing Microsoft Fabric Community Forum.

 

Hi @Drew808 
Just checking in we noticed that @MasonMA has provided a response to your question. If the solution helped resolve your issue, please consider marking it as "Accept Answer" and giving it an upvote. This helps others in the community who might be facing a similar scenario.

If you're still having trouble or need further clarification, feel free to reply with more details — we’re happy to assist further.

 

Thank you for being a part of the Microsoft Fabric Community!

Hey @Drew808 ,


Just checking in on your question about displaying data from two different datasets on a clustered bar chart. 

If you're still facing challenges or need help implementing the suggested DAX and dimension table approach, feel free to share more details or a sample report ,we’re happy to take another look.

If your issue has been resolved, it would be great if you could update the case, if any of the responses helped, please consider marking one as the Accepted Answer so others in the community can benefit too.

 

Thanks again for being part of the Microsoft Fabric Community!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.