Forum Discussion
GAETAN63
6 years agoNew Member
Get the most recent value from a numeric column
Hello, I have a table with lower and upper limits given for specific products (mix name) and measurements method (propertie). Those limits can change with time, and I'm looking for a DAX measurement ...
- 6 years ago
Hi all! I found a great solution on this last post: https://community.powerbi.com/t5/Desktop/How-can-I-get-the-last-value-of-a-column-in-my-dataset/td-p/33602
I put the solution in an updated picture, thanks to all answers below!
see you,
Anonymous
6 years agoNot applicable
[Last TI] =
if(
HASONEVALUE( T[Mix Name] )
&& HASONEVALUE( T[Propertie] ),
var __rows =
topn(1,
YourTable,
YourTable[Date Fabrication],
DESC
)
return
if(
COUNTROWS( __rows ) = 1,
MAXX(
__rows,
YourTable[TI]
)
)
)
[Last TS] =
if(
HASONEVALUE( T[Mix Name] )
&& HASONEVALUE( T[Propertie] ),
var __rows =
topn(1,
YourTable,
YourTable[Date Fabrication],
DESC
)
return
if(
COUNTROWS( __rows ) = 1,
MAXX(
__rows,
YourTable[TS]
)
)
)
Best
D