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
Anonymous
Not applicable

How to break a column into multiple columns based on the content?

Hello community,

 

I have a problem in transformingin query editor the Table 1 shown below in a way that I can have each section amount values in a separated column (like table 2 shown below), so I can perform row calculations between these.

 

Can you please let me know how I can transform the Table 1 into Table 2 as shown below?

MariosChr90_1-1604162762905.png

 

Thank you.

1 ACCEPTED SOLUTION
CNENFRNL
Community Champion
Community Champion

Hi, @Anonymous , all you need to do is to pivot the column Section in Power Query

Untitled.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

3 REPLIES 3
AllisonKennedy
Super User
Super User

@Anonymous
Please let us know if the solution from @CNENFRNL has worked. If not, please let us know why so we can continue to help.
What 'row calculations' do you want to perform? I don't typically recommend using the Pivot in Power Query for most datasets, and prefer to leave it in flat tabular format to allow the calculations to be performed column by column with DAX.
You can get what you have asked for in a Table visualization in the report view and many of your row calculations can be done using the row context of DAX and filter functions. Let us know more details on what you're trying to achieve as an end result and we can provide more advice.
Cheers!

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

CNENFRNL
Community Champion
Community Champion

Hi, @Anonymous , all you need to do is to pivot the column Section in Power Query

Untitled.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Anonymous
Not applicable

Hi @CNENFRNL,

 

It looks to work fine! Many thanks for the support! 

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.