Forum Discussion
Unpivot calculated columns
- 9 years ago
Hi AGo,
In PowerBI desktop, we can only unpivot table in Query Edit. It is not allowed to use DAX to change the table structure. And as you know, calculated columns will not display in Query edit, so your requirement cannot be achieved currently.
Thanks,
Yuliana Gu
Hi AGo,
In PowerBI desktop, we can only unpivot table in Query Edit. It is not allowed to use DAX to change the table structure. And as you know, calculated columns will not display in Query edit, so your requirement cannot be achieved currently.
Thanks,
Yuliana Gu
Hi v-yulgu-msft,
Is this limitation still in force? Have there been any changes since Sep'16?
I have a hierarchy table which has columns for levels up to 20; created using path function in DAX. I need to get every node associated with a different table. To my knowledge, this is only possible by unpivoting columns to have only 2 columns; parents and all linked children. As the hierarchy is identified in DAX, the rest must be done using DAX as well.
An example of the desired output based on the given hierarchy table:
Hierarchy table created with the help of DAX PATH function
| Level1 | Level2 | Level3 | Level4 |
| A | B | C | D |
| A | B | C | F |
| A | B | G | |
| A | H | ||
| |||
| Desired Output: | |||
| Parents | Children | ||
| A | B | ||
| A | C | ||
| A | D | ||
| A | F | ||
| A | G | ||
| A | H | ||
| B | C | ||
| B | D | ||
| B | F | ||
| B | G | ||
| C | D | ||
| C | F |