Forum Discussion
Using the sum from two different reports in bar chart
- 1 year ago
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
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.