Forum Discussion

Omega's avatar
Omega
Icon for Impactful Individual rankImpactful Individual
6 years ago
Solved

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...
  • nandukrishnavs's avatar
    6 years ago

    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



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