Forum Discussion
Max for date and time 2 columns
- 4 years ago
Hi patoku0207 ,
Just so I understand correctly, you would like to return the balance per item and number which has the highest date. If two dates are equal, then we shall take the higher time. If even these two times are equal, we shall take the higher time suffix. For the calculation we must not consider the rows with number = 999999999.
This is my result:
This is the measure I used:
TomsBalanceMeasure = VAR _maxValue = CALCULATE ( MAXX ( Table, Value( Table[date] & Table[time] & Table[suffix time] ) ), ALLEXCEPT ( Table, Table[Item] ), Table22[number] <> 999999999 ) RETURN CALCULATE ( MAX ( Table[balance] ), VALUE ( Table[date] & Table[time] & Table[suffix time] ) == _maxValue )Does this solve your issue? 🙂
/Tom
Hi patoku0207 ,
Just so I understand correctly, you would like to return the balance per item and number which has the highest date. If two dates are equal, then we shall take the higher time. If even these two times are equal, we shall take the higher time suffix. For the calculation we must not consider the rows with number = 999999999.
This is my result:
This is the measure I used:
TomsBalanceMeasure =
VAR _maxValue =
CALCULATE (
MAXX ( Table, Value( Table[date] & Table[time] & Table[suffix time] ) ),
ALLEXCEPT ( Table, Table[Item] ),
Table22[number] <> 999999999
)
RETURN
CALCULATE (
MAX ( Table[balance] ),
VALUE ( Table[date] & Table[time] & Table[suffix time] ) == _maxValue
)
Does this solve your issue? 🙂
/Tom