Forum Discussion
spocx
8 years agoHelper I
Finding first value with same ID in multiple rows based on date/time
Dear Power BI community I need help to write a DAX formular that can identify the first value in multiple rows with the same ID based on date/time. I have a table as shown below and need to calcu...
- 8 years ago
Hi spocx,
First Assign team = VAR firstassigndate = CALCULATE ( MIN ( 'table 1'[Assign date/time] ), ALLEXCEPT ( 'table 1', 'table 1'[Ticket ID] ) ) RETURN CALCULATE ( SELECTEDVALUE ( 'table 1'[Team assigned] ), FILTER ( ALLEXCEPT ( 'table 1', 'table 1'[Ticket ID] ), 'table 1'[Assign date/time] = firstassigndate ) )Best regards,
Yuliana Gu
v-yulgu-msft
8 years agoMicrosoft Employee
Hi spocx,
First Assign team =
VAR firstassigndate =
CALCULATE (
MIN ( 'table 1'[Assign date/time] ),
ALLEXCEPT ( 'table 1', 'table 1'[Ticket ID] )
)
RETURN
CALCULATE (
SELECTEDVALUE ( 'table 1'[Team assigned] ),
FILTER (
ALLEXCEPT ( 'table 1', 'table 1'[Ticket ID] ),
'table 1'[Assign date/time] = firstassigndate
)
)
Best regards,
Yuliana Gu
spocx
8 years agoHelper I
Hi Yuliana
Your solution works perfectly. Thank you so much.
Best regards,
Jonas