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
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.