Forum Discussion
Anonymous
4 years agoNot applicable
Transform Data from DAX query table to Power Query Editor
Hi
I was trying to union a few columns into a new column in the same table with a new table name by using DAX. When I tried to establish a relationship it didn't let me do in the DAX asking me to remove existing. And, I did try joining the table in Power Query Editor but it didn't go through when I tried to transform data. Is there a way to transform data in the query editor or establish the relationship with a new table in Power BI Desktop? Or Write the Union Syntax in Power Query Editor?
Thanks
Using Dax....
SMEMatrix =
DISTINCT (
UNION (
SELECTCOLUMNS ( 'SME Matrix',"SRP ID",'SME Matrix'[SRP ID],"Project Name",'SME Matrix'[Project Name], "SMEUSERID", 'SME Matrix'[Location 1 [See Note 3A]]],"Field Name","Location 1 [See Note 3A"),
SELECTCOLUMNS ( 'SME Matrix',"SRP ID",'SME Matrix'[SRP ID],"Project Name",'SME Matrix'[Project Name], "SMEUSERID", 'SME Matrix'[Location 2],"Field Name","Location 2" ),
SELECTCOLUMNS ( 'SME Matrix',"SRP ID",'SME Matrix'[SRP ID],"Project Name",'SME Matrix'[Project Name], "SMEUSERID", 'SME Matrix'[Project Description],"Field Name","Project Description" )
)
)
NewStep=Table.UnpivotOtherColumns(PreviousStepName,{"SRP ID","Project Name"},"Field Name","SMEUSERID")
2 Replies
- wdx223_DanielCommunity Champion
NewStep=Table.UnpivotOtherColumns(PreviousStepName,{"SRP ID","Project Name"},"Field Name","SMEUSERID")
- AnonymousNot applicable
Thank you.