Forum Discussion
Get values based on maximum timestamp
- Anonymous4 years ago
Hi Anonymous ,
I suggest you to create a measure , add this measure into visual level filter in your visual and set it to show items when value =1.
Then your visual will only show the data in latest timestamp for each machine number.
Measure Filter = VAR _LatestTimeStamp_EachMachine = MAXX(FILTER(ALL('Table'),'Table'[MachineNumberLocal] = MAX('Table'[MachineNumberLocal])),'Table'[TagTimeStamp_EST]) RETURN IF(MAX('Table'[TagTimeStamp_EST]) = _LatestTimeStamp_EachMachine,1,0)Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I tried it and the measures behave a bit weirdly when used together.
I brought in Machine Number, Incoming Bar and Outgoing Bar to the same table and it calculates the first measure just fine, but the second one does not show all values. For example, when icoming bar is added to the visual first, outgoing bar does not have all values. When outgoing bar is added to the table visual first (as in image below), incoming bar does not have all the values.
Any idea why?
Hi Anonymous ,
I suggest you to create a measure , add this measure into visual level filter in your visual and set it to show items when value =1.
Then your visual will only show the data in latest timestamp for each machine number.
Measure Filter =
VAR _LatestTimeStamp_EachMachine = MAXX(FILTER(ALL('Table'),'Table'[MachineNumberLocal] = MAX('Table'[MachineNumberLocal])),'Table'[TagTimeStamp_EST])
RETURN
IF(MAX('Table'[TagTimeStamp_EST]) = _LatestTimeStamp_EachMachine,1,0)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.