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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
avou26
Frequent Visitor

Using the sum from two different reports in bar chart

Hello,

 

I have two different data sources that each have a list of payments and their corresponding dates( lets call them lake payments and park payments). I would like to have a bar chart that shows the two seperate totals per year in order to compare the lake payements sum and the park payments sum. the issue i am running into is that depending on the year field i use, either from lake payments or park payments, the totals change and only the total for the report that us having the date field used is correct. i have created a seperate calendar report but when i use that year field, it shows the same total for each year. Is there a way to have this show correctly?

 

Thank you in advance!

1 ACCEPTED SOLUTION
Kedar_Pande
Super User
Super User

@avou26 

Yes, you can fix this issue by ensuring that both data sources (Lake Payments and Park Payments) are correctly linked to your calendar table.

 

Link the Date field in the Calendar table to the Date field in both the Lake Payments and Park Payments tables. Ensure both relationships are inactive so you can control them with DAX.

 

Measure 1:

LakePaymentsSum =
CALCULATE(
SUM('Lake Payments'[PaymentAmount]),
USERELATIONSHIP('Calendar'[Date], 'Lake Payments'[Date])
)


Measure 2:

ParkPaymentsSum =
CALCULATE(
SUM('Park Payments'[PaymentAmount]),
USERELATIONSHIP('Calendar'[Date], 'Park Payments'[Date])
)

 

  • Use the Year field from the Calendar table for the axis.
  • Use the two new measures (LakePaymentsSum and ParkPaymentsSum) for the values.

If this helped, a Kudos 👍 or Solution mark would be great!

Cheers,

Kedar Pande

www.linkedin.com/in/kedar-pande

 

View solution in original post

4 REPLIES 4
Kedar_Pande
Super User
Super User

@avou26 

Yes, you can fix this issue by ensuring that both data sources (Lake Payments and Park Payments) are correctly linked to your calendar table.

 

Link the Date field in the Calendar table to the Date field in both the Lake Payments and Park Payments tables. Ensure both relationships are inactive so you can control them with DAX.

 

Measure 1:

LakePaymentsSum =
CALCULATE(
SUM('Lake Payments'[PaymentAmount]),
USERELATIONSHIP('Calendar'[Date], 'Lake Payments'[Date])
)


Measure 2:

ParkPaymentsSum =
CALCULATE(
SUM('Park Payments'[PaymentAmount]),
USERELATIONSHIP('Calendar'[Date], 'Park Payments'[Date])
)

 

  • Use the Year field from the Calendar table for the axis.
  • Use the two new measures (LakePaymentsSum and ParkPaymentsSum) for the values.

If this helped, a Kudos 👍 or Solution mark would be great!

Cheers,

Kedar Pande

www.linkedin.com/in/kedar-pande

 

This worked perfectly! Thank you !

parry2k
Super User
Super User

@avou26 seems like you are on the right path, set relationship from the calendar table with two other tables on the date column and then in the visualization use year from the calendar table and the sum value from the respective table and it will show sum from both the tables at the same axis.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Jpss
Resolver II
Resolver II

You definately need to use a calendar table. so that part is correct. 

 

However from what you have described,  it looks like the relationships are not set up correctly. Please make sure that the relationships are created between date table and both the fact tables
to help you better, it would be best If you can share a sample pbix file with sample dataset and relationships built in the data model, same way as in your report.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.