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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

How to create a clustered column chart with sum from multiple datasets

Hello,

 

I have been at this for a couple hours.

 

Dataset A has expenses in dollars by category with dates.

Dataset B has budgets in dollars by category with dates.  

The categories are mostly the same.

 

Is it possible to make a clustered column chart that will sum these two dollar amounts, in order to visualize the deficit/surplus over a given amount of time?

 

I tried making a third dataset with just the category, but it would only have 1 active relationship to A or B.

 

Thank you,

Danny

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

 

Ideally you should append the two datasets (Give a name to this appended dataset as Data).  Ensure that there is column in the Appended dataset which says "Budget" or "Actual" to identify the information in that row.  Then create a Calendar Table and build a relationship from the Date column of the appended dataset to the Date column of the Calendar Table. In the Calendar Table, extract Year and Month by using the following calculated column formulas: Year = Year(Calendar[Date]) and Month = FORMAT(Calendar[Date],"mmmm").

 

Write these measures

 

Actual = CALCULATE(SUM(Data[Amount]),Data[Type]="Actual")

Budget = CALCULATE(SUM(Data[Amount]),Data[Type]="Budget")

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

1 REPLY 1
Ashish_Mathur
Super User
Super User

Hi,

 

Ideally you should append the two datasets (Give a name to this appended dataset as Data).  Ensure that there is column in the Appended dataset which says "Budget" or "Actual" to identify the information in that row.  Then create a Calendar Table and build a relationship from the Date column of the appended dataset to the Date column of the Calendar Table. In the Calendar Table, extract Year and Month by using the following calculated column formulas: Year = Year(Calendar[Date]) and Month = FORMAT(Calendar[Date],"mmmm").

 

Write these measures

 

Actual = CALCULATE(SUM(Data[Amount]),Data[Type]="Actual")

Budget = CALCULATE(SUM(Data[Amount]),Data[Type]="Budget")

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.