Forum Discussion
Anonymous
3 years agoNot applicable
Last date dax
Hi experts, I want to filter records based on the date filed dynamically , when the user will select any of the month, then I want to show the data accordingly. Please help Date ...
- Anonymous3 years ago
HI Anonymous,
You can create a measure formula to get the last date based on group and compare with current row date to return flag, then you can use this on ‘visual level filter’ to filter records:
formula = VAR _lastdate = CALCULATE ( MAX ( Table[Date] ), ALLSELECTED ( Table ), VALUES ( Table[Type] ) ) VAR currdate = MAX ( Table[Date] ) RETURN IF ( currdate = _lastdate, "Y", "N" )Regards,
Xiaoxin Sheng
Anonymous
3 years agoNot applicable
HI Anonymous,
You can create a measure formula to get the last date based on group and compare with current row date to return flag, then you can use this on ‘visual level filter’ to filter records:
formula =
VAR _lastdate =
CALCULATE ( MAX ( Table[Date] ), ALLSELECTED ( Table ), VALUES ( Table[Type] ) )
VAR currdate =
MAX ( Table[Date] )
RETURN
IF ( currdate = _lastdate, "Y", "N" )
Regards,
Xiaoxin Sheng