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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
mcflurry
Helper I
Helper I

Pivoted table with multiple values on one column

I'm facing a problem pivoting a table.

I have issues with 3 columns (after pivoting) which fields have more than one value.

The problem is that these columns have hundreds of fields with their right values but all the other columns for this value are filled with NULL.

It makes sense as those fields have no data.

So i have no idea on how to solve this.

8 REPLIES 8
dufoq3
Super User
Super User

Hi @mcflurry, could you provide expected result based on this data please?

dufoq3_0-1720540901326.png

 


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

Without further clarification and sample data I can only guess...

  1. Take you 100K table
  2. Do a group by on all columns except the insight attribute columns
    • selecting 'keep all rows'
    • Name the aggregate  column [Attribute Rows]
  3. Add an new column with the following formula
    • = Table.AddColumn(#"Grouped Rows", "Attributes", each Text.Combine([Attribute Rows][INSIGHT_ATTRIBUTE_NAME], "|"))

Combine in the same cell based on other field (server name, object key... i have a few fields which can be used for this) separataed by a ||

If you want us to help you, it is mandantory to privide sample data in usable format (if yo don't know how - read note below my post) and expected result based on sample data (at least screenshot)


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

mcflurry
Helper I
Helper I

So, the point is:

Pivoting a column when there are multiple values creates hundreds of NULL fields because it doesn't merge the values... would it be possible to concatenate these? Merge???

mcflurry
Helper I
Helper I

All my data is like this:

mcflurry_0-1720422907055.png

I have +100k rows with the values in rows instead of columns.

So in order to get it "correctly" i group the data bye INSIGHT_ATTRIBUTE_NAME, then add an Index Column and then pivot it so i get a colum for each of these values.

 

But as for columns with more than one value (like CPUs, Disk and Network Interfaces) it creates a lot of rows for these (some servers have 10 network interfaces, 32 CPUs, and 15 Disks):

mcflurry_1-1720423022329.pngmcflurry_2-1720423038283.png

 

Just like this, CPUs, Network Interfaces and Disks columns have hundreds of values surround but everything else "null".

 

mcflurry_3-1720423841856.png

 

 

 

 

 

 

Anonymous
Not applicable

Hi @mcflurry 

As @dufoq3  mentioned, you need to share some sample data, the original data you have offered cannot describe it clearly, can you provide some sample data and the output you want so that can provide more suggestion for you.

 

Best Regards!

Yolo Zhu

Greg_Deckler
Community Champion
Community Champion

@mcflurry Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.