Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a table with 4 CALCULATED cols:
Col1 Col2 Col3 Col4
Val1 Val2 Val3 Val4
Val5 Val6 Val7 Val8
I want to to create a new table with a single column which has values from Col2 and col3:
ie. NewCol
Val2
Val3
Val6
Val7
Is this possible?
Solved! Go to Solution.
Following the post of @jessicammoss
You can simplified this doing:
Create a New Table:
Table = UNION(VALUES(Table1[Col2]),VALUES(Table1[Col3]))
Following the post of @jessicammoss
You can simplified this doing:
Create a New Table:
Table = UNION(VALUES(Table1[Col2]),VALUES(Table1[Col3]))
Assuming a base table of "CalcColTable", and column names as described, I think this expression for a new table will work. I'm not sure if there's a way to refactor the expression and make it simpler, but it produces the right outcome.
NewTable = UNION(CALCULATETABLE(SELECTCOLUMNS(CalcColTable, "NewCol", CalcColTable[Col2])), SELECTCOLUMNS(CalcColTable, "NewCol", CalcColTable[Col3]))
HTH,
Jessica
@AGo in power bi desktop, go to query editor (Edit Queries) and highlight column col2 and col3 and under Transform tab click Unpivot Columnns. Then remove unwanted columns.
This is the query editor, it doesn't contain the calculated columns of Power BI Desktop.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
75 | |
73 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |