max date column power bi code example
Example: Power bi column show max date for each category
VAR _CategoryLast=
CALCULATETABLE(
ADDCOLUMNS (
VALUES ( 'Table'[Category] ),
"MinValue", CALCULATE (MAX ( 'Table'[Value] ),ALL ( 'Table'[Value] ))
),
ALL('Table'[Value]),
ALL('Table'[Date])
)
RETURN
CALCULATE(
MIN('Table'[Value]),
KEEPFILTERS (
TREATAS (
_CategoryLast,
'Table1'[Category],
'Table1'[Value]
)
)
)