Forum Discussion
asebes
5 years agoFrequent Visitor
YTD Context in Matrix
Seems like this should be easy but can't quite get my DAX Measure to work. All I need is a YTD row in my matrix based on the applicable month. So my matrix shows the previous 6 months and need a...
- Anonymous5 years ago
Hi asebes ,
You can create a measure as below and apply a relative date slicer, please find the details in the attachment.
Measure = VAR _curdate = SELECTEDVALUE ( 'Table'[date] ) RETURN CALCULATE ( SUM ( 'Table'[data] ), FILTER ( ALL ( 'Table' ), 'Table'[date] >= DATE ( YEAR ( _curdate ), 1, 1 ) && 'Table'[date] <= EOMONTH ( _curdate, 0 ) ) )Best Regards
Anonymous
5 years agoNot applicable
Hi asebes ,
You can create a measure as below and apply a relative date slicer, please find the details in the attachment.
Measure =
VAR _curdate =
SELECTEDVALUE ( 'Table'[date] )
RETURN
CALCULATE (
SUM ( 'Table'[data] ),
FILTER (
ALL ( 'Table' ),
'Table'[date] >= DATE ( YEAR ( _curdate ), 1, 1 )
&& 'Table'[date] <= EOMONTH ( _curdate, 0 )
)
)
Best Regards
asebes
5 years agoFrequent Visitor
works great! thanks for the expertise!