Forum Discussion
JuliaYebra
8 years agoHelper III
Last reading
Hello, I have this dataset with different temperature readings for same items. Is it any way to only keep the last reading for each item? This would be the yellow records. Thanks
- Anonymous8 years ago
Go to Modeling and hit New Table.
NewTable = SUMMARIZE( FILTER( ADDCOLUMNS( TableName, "Last Reading", VAR lastreadingdate = CALCULATE( MAX(TableName[Date]), ALLEXCEPT(TableName, TableName[Item]) ) RETURN IF(TableName[Date] = lastreadingdate, TRUE, FALSE) ), [Last Reading] = TRUE ), TableName[Machine], TableName[Item], TableName[Date], TableName[Temperature] )
Anonymous
8 years agoNot applicable
Go to Modeling and hit New Table.
NewTable = SUMMARIZE( FILTER( ADDCOLUMNS( TableName, "Last Reading", VAR lastreadingdate = CALCULATE( MAX(TableName[Date]), ALLEXCEPT(TableName, TableName[Item]) ) RETURN IF(TableName[Date] = lastreadingdate, TRUE, FALSE) ), [Last Reading] = TRUE ), TableName[Machine], TableName[Item], TableName[Date], TableName[Temperature] )