Forum Discussion
newpbiuser01
Helper V
3 years agoUnpivoting in DAX
Hello, I currently have 8 different tables that are related to one another and I'm pulling in a name from each of the tables to create a comma seperated list of reportees for each manager. Unfort...
- 2 years ago
Hi newpbiuser01
Please try
Table2 = seleactcolumns ( GENERATE ( Table1, VAR String = Table1[Reportees] VAR Items = SUBSTITUTE ( String, ", ", "|" ) VAR Length = PATHLENGTH ( Items ) VAR T = GENERATESERIES ( 1, Length, 1 ) RETURN SELECTCOLUMNS ( T, "Reportee", PATHITEM ( Items, [Value] ) ) ), "Manager", [Manager], "Reportee", [Reportee] )
tamerj1
Community Champion
2 years agoHi newpbiuser01
Please try
Table2 =
seleactcolumns (
GENERATE (
Table1,
VAR String = Table1[Reportees]
VAR Items =
SUBSTITUTE ( String, ", ", "|" )
VAR Length =
PATHLENGTH ( Items )
VAR T =
GENERATESERIES ( 1, Length, 1 )
RETURN
SELECTCOLUMNS ( T, "Reportee", PATHITEM ( Items, [Value] ) )
),
"Manager",
[Manager],
"Reportee",
[Reportee]
)
newpbiuser01
Helper V
2 years agoThank you!