Forum Discussion
icbd
4 years agoHelper I
Create top X table visual
Good morning all, I am registering faults on a machine, where I have start time, end time and description of all faults. I am trying to get a table visual to only display the longest duration fau...
- 4 years ago
Hi icbd ,
First create a measure to get your MAX duration:
_maxDuration = MAX(yourTable[Duration])Then create a measure that picks out your [Fault Start] date where the duration is the MAX:
_maxFaultStart = VAR __maxStart = MAX(yourTable[Duration]) RETURN CALCULATE( SELECTEDVALUE(yourTable[Fault Start]), yourTable[Duration] = __maxStart )Put [Description], [_maxDuration], and [_maxFaultStart] into a table and it should do want you need.
Pete
BA_Pete
4 years agoSuper User
Hi icbd ,
First create a measure to get your MAX duration:
_maxDuration = MAX(yourTable[Duration])
Then create a measure that picks out your [Fault Start] date where the duration is the MAX:
_maxFaultStart =
VAR __maxStart =
MAX(yourTable[Duration])
RETURN
CALCULATE(
SELECTEDVALUE(yourTable[Fault Start]),
yourTable[Duration] = __maxStart
)
Put [Description], [_maxDuration], and [_maxFaultStart] into a table and it should do want you need.
Pete