Forum Discussion
mabCOLONEL
3 years agoFrequent Visitor
Count dates past a dynamic date on another table with criteria.
Hi everyone. I have a pretty basic need for a measure here. I have two tables. One has an index of location attributes. It includes an 'end date'. Another table is production data. So actions t...
- 3 years ago
I made a measure for the 'end date' (End Date = 'Index'[End Date] and just added that to countrows measure:
past end date = COUNTROWS(FILTER('Data Points','Data Points[Date] > 'Index'[End Date]))
Barthel
Solution Sage
3 years agoHey mabCOLONEL,
You can create a measure for this that you can place in a matrix. This measure calculates per location the number of rows (actions) whose date is after the end date. And then takes the sum of that.
Past End =
SUMX (
KEEPFILTERS ( 'Index' ),
CALCULATE (
COUNTROWS ( 'Data Points' ),
'Data Points'[Date] > EARLIER ( 'Index'[End Date] )
)
)mabCOLONEL
3 years agoFrequent Visitor
I made a measure for the 'end date' (End Date = 'Index'[End Date] and just added that to countrows measure:
past end date = COUNTROWS(FILTER('Data Points','Data Points[Date] > 'Index'[End Date]))