Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
AGo
Post Patron
Post Patron

Unpivot calculated columns

Is it possible to unpivot some calculated columns with one of the Power BI Desktop tools or using DAX? I have 8 calculated columns titled with the type of the event valued with date format.

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

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

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yulgu-msft
Employee
Employee

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

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Is there any other way to do this please?

 

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 

 
Level1Level2Level3Level4
ABCD
ABCF
ABG 
AH  

 

 

Desired Output:
ParentsChildren  
AB  
AC  
AD  
AF  
AG  
AH  
BC  
BD  
BF  
BG  
CD  
CF  

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.