Forum Discussion
Previous Row value DAX
- Anonymous3 years ago
Hi Uzi2019 ,
Please hvae a try.
Create a measure.
Measure = VAR _1 = CALCULATE ( SUM ( 'Table'[Billed Amount] ), FILTER ( ALL ( 'Table' ), 'Table'[ORDER DATE] <= SELECTEDVALUE ( 'Table'[ORDER DATE] ) && 'Table'[Brand ] = SELECTEDVALUE ( 'Table'[Brand ] ) && 'Table'[Order ID] = SELECTEDVALUE ( 'Table'[Order ID] ) ) ) VAR _MINDATE = MINX ( FILTER ( ALL ( 'Table' ), 'Table'[Brand ] = SELECTEDVALUE ( 'Table'[Brand ] ) && 'Table'[Order ID] = SELECTEDVALUE ( 'Table'[Order ID] ) ), 'Table'[ORDER DATE] ) VAR _MIN = CALCULATE ( MAX ( 'Table'[Amount] ), FILTER ( ALL ( 'Table' ), 'Table'[ORDER DATE] = _MINDATE ) ) RETURN _MIN - _1How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ RongtieIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Uzi2019 ,
Please hvae a try.
Create a measure.
Measure =
VAR _1 =
CALCULATE (
SUM ( 'Table'[Billed Amount] ),
FILTER (
ALL ( 'Table' ),
'Table'[ORDER DATE] <= SELECTEDVALUE ( 'Table'[ORDER DATE] )
&& 'Table'[Brand ] = SELECTEDVALUE ( 'Table'[Brand ] )
&& 'Table'[Order ID] = SELECTEDVALUE ( 'Table'[Order ID] )
)
)
VAR _MINDATE =
MINX (
FILTER (
ALL ( 'Table' ),
'Table'[Brand ] = SELECTEDVALUE ( 'Table'[Brand ] )
&& 'Table'[Order ID] = SELECTEDVALUE ( 'Table'[Order ID] )
),
'Table'[ORDER DATE]
)
VAR _MIN =
CALCULATE (
MAX ( 'Table'[Amount] ),
FILTER ( ALL ( 'Table' ), 'Table'[ORDER DATE] = _MINDATE )
)
RETURN
_MIN - _1
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.