Forum Discussion
deaconb
2 years agoHelper I
Column value from row
We have training data that looks like below: Name Role ResponseID Trainer A Trainee 7125417 Z Z Trainer 7125417 A Trainee 7125461 Y Y Trainer 7125461 B Tr...
- 2 years ago
Hi deaconb
There are many ways to achive your required output, and one example is as shown below:
I attach an example pbix file.
Anonymous
2 years agoNot applicable
Hi deaconb ,
Thanks to tamerj1 and DataNinja777 for thier methods.
Here's how I solved it
Create column
Trainer =
VAR _result =
CALCULATE(
MAX('Table'[Name]),
FILTER(
ALLEXCEPT(
'Table',
'Table'[ResponseID]
),
'Table'[Role] = "Trainer"
)
)
RETURN
IF(
'Table'[Role] = "Trainee",
_result,
BLANK()
)
Create a calculated table
Result =
SELECTCOLUMNS(
FILTER('Table','Table'[Trainer] <> BLANK()),
"ResponseID",'Table'[ResponseID],
"Trainee",'Table'[Name],
"Trainer",'Table'[Trainer]
)
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly