SOLVED

Excel help

Brass Contributor

Dears,

Could you please help me to get the proper function for the attached sheet, as i want to transpose the data vertically as the below

UnitDue DateAmount
1803/10/20186,364.38
1803/04/20205,672.40
1803/07/2021768.41
4 Replies

@hussein_elsayed 

 

Hi,

 

I think the shortest way to do that is with Power Query:

 

let
    Origen = Excel.CurrentWorkbook(){[Name="Tabla5"]}[Content],
    #"Columnas quitadas" = Table.RemoveColumns(Origen,{"Client Name"}),
    #"Otras columnas con anulación de dinamización" = Table.UnpivotOtherColumns(#"Columnas quitadas", {"Unit #"}, "Atributo", "Valor"),
    #"Tipo cambiado1" = Table.TransformColumnTypes(#"Otras columnas con anulación de dinamización",{{"Unit #", type text}}),
    #"Columnas con nombre cambiado" = Table.RenameColumns(#"Tipo cambiado1",{{"Unit #", "Unit"}, {"Atributo", "Due Date"}, {"Valor", "Amount"}}),
    #"Tipo cambiado2" = Table.TransformColumnTypes(#"Columnas con nombre cambiado",{{"Amount", Currency.Type}})
in
    #"Tipo cambiado2"

 

 

Unit        Due Date               Amount

1803/10/20186365,38
1803/04/20205672,40
1803/07/2021768,41
2807/12/201857,04
2807/03/2019141,20
2807/12/2019201,31
2807/03/2020758,41
2807/06/202015,47
2807/09/2020201,02
2807/03/202121493,79
2807/06/202121533,06
2807/09/20214306,61
3328/11/20192127,26
3328/02/2020567,58
3328/05/2020564,31
3328/08/2020416,20
3328/11/2020261,03
3328/02/2021108,16
3328/05/2021103,59

 

Try it.

 

Regards,


CarlosF

Thank you Mr. Carlos,
Could you please explain how can i do that in a simple steps like you did
best response confirmed by Hans Vogelaar (MVP)
Solution

@hussein_elsayed 

First I convert your data into a Excel Table (select all the data and I use Insert->Table).
Second, I used Data->Get Data from Table to open Power Query.
Then:

  1. I removed the column "Client Name"
  2. Select the column "Unit #", right click on it and select "Unpivot other columns"
  3. Finally, I change the data format, columns names

And that's all.

 

CarlosF

Thank you dear, i got it
1 best response

Accepted Solutions
best response confirmed by Hans Vogelaar (MVP)
Solution

@hussein_elsayed 

First I convert your data into a Excel Table (select all the data and I use Insert->Table).
Second, I used Data->Get Data from Table to open Power Query.
Then:

  1. I removed the column "Client Name"
  2. Select the column "Unit #", right click on it and select "Unpivot other columns"
  3. Finally, I change the data format, columns names

And that's all.

 

CarlosF

View solution in original post