Forum Discussion
JCK2
3 years agoHelper III
Get latest value based on max date
Hello!!! I want to get the latest target based on the latest date and for the date format has time also, so basically the latest value based on max date and time. The expeted output of this i...
FreemanZ
3 years agoSuper User
hi JCK2
try to plot a visual table with a measure of this:
Target2 =
VAR _value = MAXX(TableName, TableName[ModifiedDate])
RETURN
MAXX(
FILTER(TableName, TableName[ModifiedDate] =_value),
TableName[Target]
)
i tried and it worked like this:
the dataset:
FreemanZ
3 years agoSuper User
it can be further simplified like this:
Target3 =
VAR _value = MAX(TableName[ModifiedDate])
RETURN
MAXX(
FILTER(TableName, TableName[ModifiedDate] =_value),
TableName[Target]
)