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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
SebSchoon1
Post Patron
Post Patron

Transpose column with repeated values

Hi guys,

 

I'm asking myself if it is possible to split rows on "Attribute" column resulted from an unpivot function.

 

heres the code at the point i have my duplicates on lines due To Qty and Size i want to keep.

 

Personnalisé3 = Table.UnpivotOtherColumns(#"Regroupement des linesheets en une colonne",#"Personnalisé2", "Attribut", "Valeur"),

Result (as desired) ==> 

SebSchoon1_0-1654099380607.png

 


#"Supprimer le tableau croisé dynamique des autres colonnes" = Table.UnpivotOtherColumns(Personnalisé3, {"Valeur"}, "Attribut.1", "Valeur.1"),#"Type modifié" = Table.TransformColumnTypes(#"Supprimer le tableau croisé dynamique des autres colonnes",{{"Valeur.1", type text}}),
#"Personnalisée ajoutée" = Table.AddColumn(#"Type modifié", "Personnalisé", each if Text.Contains([Valeur.1],"Size") = true then [Valeur] else if Text.Contains([Valeur.1],"Qty") = true then [Valeur] else [Valeur.1]),
Personnalisé1 = Table.AddColumn(#"Personnalisée ajoutée", "Attribut.2", each if Text.Contains([Valeur.1],"Size") = true then "Taille" else if Text.Contains([Valeur.1],"Qty") = true then "Quantity" else [Attribut.1]),
#"Colonnes supprimées" = Table.RemoveColumns(Personnalisé1,{"Valeur", "Attribut.1", "Valeur.1"}),
#"Colonnes permutées" = Table.ReorderColumns(#"Colonnes supprimées",{"Attribut.2", "Personnalisé"}),
#"Colonnes renommées" = Table.RenameColumns(#"Colonnes permutées",{{"Attribut.2", "Attribut"}, {"Personnalisé", "Valeur"}}),

SebSchoon1_1-1654099478643.png

 

I would like to transpose my column 1 ([Attribut]) With all the data inside [Valeurs] in Rows.

 

Like this i could have a Table With all the columns reapeated + Quantity and Sizes at Row level

 

Is this feasible?

1 ACCEPTED SOLUTION
SebSchoon1
Post Patron
Post Patron

My Bad, 

 

Posting to fast, 

 

i have been able to manage it.

 

-I created a Index column

-I created a conditionnal column ( If [Attribut] = "Season") then "XITEMX"&[Index] else Null

- I drop down values.

-I aggregate tables with = Table.Group(#"Colonnes supprimées1", {"Personnalisé"}, {{"allrows", each _, type table [Attribut=text, Valeur=text, Personnalisé=text]}})

-I transpose each tables in a new column

==> = Table.AddColumn(#"Lignes groupées", "Personnalisé.1", each Table.Transpose([allrows]))

 

Promote headers,

 

Expand 🙂

View solution in original post

1 REPLY 1
SebSchoon1
Post Patron
Post Patron

My Bad, 

 

Posting to fast, 

 

i have been able to manage it.

 

-I created a Index column

-I created a conditionnal column ( If [Attribut] = "Season") then "XITEMX"&[Index] else Null

- I drop down values.

-I aggregate tables with = Table.Group(#"Colonnes supprimées1", {"Personnalisé"}, {{"allrows", each _, type table [Attribut=text, Valeur=text, Personnalisé=text]}})

-I transpose each tables in a new column

==> = Table.AddColumn(#"Lignes groupées", "Personnalisé.1", each Table.Transpose([allrows]))

 

Promote headers,

 

Expand 🙂

Helpful resources

Announcements
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.