Forum Discussion
Omega
Impactful Individual
6 years agoOpen 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...
- 6 years ago
Omega
Try thisTotal = 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 _resultOutput
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
nandukrishnavs
Community Champion
6 years agoOmega
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 🙂