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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
RobRayborn
Helper IV
Helper IV

Sum between two dates using Date Table, two issues

1. I need to calculate the amount of sales that runs between the 'Order Date' where the 'Ship Date' is within the same Month.

I have a dimDate table that has an Active date relationship with the 'Orders Taken' [Ship Date].  This dimDate Table also has an Inactive relationship with the 'Orders Taken', [Order Date].  I also have a SUMX('Orders Taken'[Orders]) measure to sum up all the $ sold in the 'Orders Taken' Table.

I am using the "Matrix" Visual and have [Months] then [Years] in the Columns, then a list of catagories in the Rows.  So, JAN, 2019&2020&2021&2022 then FEB, 2019&2020.....

 

2. Somewhat the same issue except I need to calculate in the same visual above, Orders Taken by Order Date until the end of the Year.

 

2 REPLIES 2
v-xiaotang
Community Support
Community Support

Hi @RobRayborn 

Thanks for reaching out to us.

Usually information below is needed, could you provide it? Thanks.

 (1) a sample file, you can replace raw data with bogus data to protect your privacy.

     or provide some sample data that fully covers your issue/question.

(2) give your expected result based on the sample you provide. If calculation formula is involved, please provide it.

Kindly note: Please ensure the data in sample is concise and representative.

Thanks.

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@RobRayborn , based on what I got

 

calculate(SUM( 'Orders Taken'[Orders]), USERELATIONSHIP ( Date[Date], 'Orders Taken', [Order Date]) )

 

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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