cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AGo Member
Member

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

Accepted Solutions
Highlighted
v-yulgu-msft Super Contributor
Super Contributor

Re: Unpivot calculated columns

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

2 REPLIES 2
Highlighted
v-yulgu-msft Super Contributor
Super Contributor

Re: Unpivot calculated columns

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

omrdmr Regular Visitor
Regular Visitor

Re: Unpivot calculated columns

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
Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 141 members 1,500 guests
Please welcome our newest community members: