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
Omega
Impactful Individual
Impactful Individual

Open Date and Ship Date

Hi, 

 

I have common issue with dates in DAX but this time with a small twist. I have 2 tables, transaction and date. 

 

Transaction Table has two date columns and value column:

 

1- Order Date: The date I'm putting the order

2- Shipping Date: The data I'm shipping the order

3- Value

 

Date Table is full year Calendar

 

I am connecting both transaction date with calendar using order date (Active relationship) and with shipping date (inactive)

 

Challenge:

 

I want to calculate the total shipment for the first 10 order dates of month that will be shipped in full month of the order date + 2

 

For example, I have orders that I put in January which will be shipped in March. I want to create a measure that will calculate the total shipment by filtering order date to be from 1-10 and ship date to be full March. My month slicer will be based on the Date Table. If I choose Jan, the measure should return 100. 

 

Please help. 

 

Thanks 🙂

 

Ex1.JPGEx2.JPGEx3.JPG

1 ACCEPTED SOLUTION
nandukrishnavs
Community Champion
Community Champion

@Omega 

Try this 

 

 

Total =
VAR _month =
    SELECTEDVALUE ( 'Date'[Date].[MonthNo] )
VAR _result =
    CALCULATE (
        SUM ( 'Transaction'[Value] ),
        FILTER (
            'Transaction',
            MONTH ( 'Transaction'[Order Date] ) = _month
                && DAY ( 'Transaction'[Order Date] ) < 11
                && MONTH ( 'Transaction'[Shipping Date] )
                    = MOD ( _month + 2, 12 )
        )
    )
RETURN
    _result

 

 

Output

Capture.JPG

Did I answer your question? Mark my post as a solution!
Appreciate with a kudos
🙂


Regards,
Nandu Krishna

View solution in original post

1 REPLY 1
nandukrishnavs
Community Champion
Community Champion

@Omega 

Try this 

 

 

Total =
VAR _month =
    SELECTEDVALUE ( 'Date'[Date].[MonthNo] )
VAR _result =
    CALCULATE (
        SUM ( 'Transaction'[Value] ),
        FILTER (
            'Transaction',
            MONTH ( 'Transaction'[Order Date] ) = _month
                && DAY ( 'Transaction'[Order Date] ) < 11
                && MONTH ( 'Transaction'[Shipping Date] )
                    = MOD ( _month + 2, 12 )
        )
    )
RETURN
    _result

 

 

Output

Capture.JPG

Did I answer your question? Mark my post as a solution!
Appreciate with a kudos
🙂


Regards,
Nandu Krishna

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.