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
Dave93
Frequent Visitor

Handling two different dates on the Axis

Hi,

 

Could someone help me with the following. I want to show for every month the total amount of invoices compared to the total amount of paid invoices. 

Two dates.png

 

To calculate the total amount of invoices I use the measure SUM('Invoice Headers'[InvoiceAmt] and for the total amount of the paid invoices I use the measure SUM( 'Payment Behaviour'[PaymentAmount]. 

 

When I make for example a barchart, I add the "Month of Year" (maand van jaar) to the Axis and the two measures as the values. But the problem with this is that measure SUM( 'Payment Behaviour'[PaymentAmount] also uses the date that is defined in the 'Invoice Headers' table and not the date 'Payment Behaviour'[PaymentDate]. Does anyone know how I can solve this problem.

 

Thanks in Advance

1 ACCEPTED SOLUTION
Dave93
Frequent Visitor

Never mind, with some trial and error I found the solution. I had to use the USERELEATIONSHIP function.

 

Measure =
CALCULATE (
    SUM ( 'Payment Behaviour'[PaymentAmount] );
    USERELATIONSHIP ( 'Payment Behaviour'[PaymentDate]; Datum[Datum] )
)

 

View solution in original post

1 REPLY 1
Dave93
Frequent Visitor

Never mind, with some trial and error I found the solution. I had to use the USERELEATIONSHIP function.

 

Measure =
CALCULATE (
    SUM ( 'Payment Behaviour'[PaymentAmount] );
    USERELATIONSHIP ( 'Payment Behaviour'[PaymentDate]; Datum[Datum] )
)

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors