Forum Discussion
Final Status Code
- 4 years ago
Hi GeorgW
try this
Measure = var _table=ALLEXCEPT('Table','Table'[ID]) var _maxtime=CALCULATE(MAX('Table'[time]),_table) var _code=200 var _mincode=CALCULATE(MIN('Table'[StausCode]),FILTER(_table,'Table'[time]=_maxtime)) return SWITCH(TRUE(), MIN('Table'[time])=_maxtime&&MIN('Table'[StausCode])=_code,_code, MIN('Table'[time])=_maxtime&&MIN('Table'[StausCode])=_mincode,100)result
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi GeorgW
try this
FinalStatusCode = CALCULATE(MAX('Table'[StatusCode]),ALLEXCEPT('Table','Table'[ID]))
result
OR
FinalStatusCode =
var _maxCode= CALCULATE(MAX('Table'[StatusCode]),ALLEXCEPT('Table','Table'[ID]))
return IF('Table'[StatusCode]=_maxCode,_maxCode,BLANK())
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
- GeorgW4 years agoHelper II
Thank you very much. No, unfortunately it is not sufficient. It should only take into account the rows that also have the same time at "Time". I have not expressed it precisely enough.
- v-xiaotang4 years agoCommunity Support
Hi GeorgW
then try
FinalStatusCode = CALCULATE(MAX('Table'[StatusCode]),ALLEXCEPT('Table','Table'[ID],'Table'[Time]))if this does not solve your question, could you show us a sample? so that we can work on it further.
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
- GeorgW4 years agoHelper II
No, it doesn't work. So it should be: