Forum Discussion
Raj_251891
5 years agoNew Member
Table visualization/ display value based on max date
Hello, I am new to power BI and need you help on below: I have the data as below: alias_no dest Msg_cod Ref No Src status ID Date & Time W W-002 PEES1001 W success 81 21/9/...
TomMartens
5 years agoSuper User
Hey Raj_251891 ,
make sure that the column Date & Time has the data type Date/Time assigned ,
I changed the data type accordingly using Power Query:
I chose the settings below:
After that I created a calculated column using DAX (doing this, allows to filter the data using a slicer).
I used this DAX statement:
is latest =
var __currentDateTime = [Date & Time]
var __maxDateTime = CALCULATE( MAX( 'Table'[Date & Time] ) , 'Table' )
return
IF( __currentDateTime = __maxDateTime , 1 , 0 )
Finally my table will look like this:
Hopefully, this is what you are looking for.
Regards,
Tom