Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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:
Which is easy to work with, simple Object names, and count up each object:
Output
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:
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!
Solved! Go to Solution.
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
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!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
76 | |
73 | |
42 | |
36 |
User | Count |
---|---|
109 | |
56 | |
52 | |
48 | |
43 |