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
jkhan
Helper III
Helper III

Table Transpose in Visual

Hi All,

 

Require help to transpose the below table 

Capture1.JPG

 

like below

Capture2.JPG

 

The idea is need to make Machine1,Machine2,Machine3 as column and remaining as rows.

 

Thanks & Best Regards

Jamsher

13 REPLIES 13
jkhan
Helper III
Helper III

Hi @PaulDBrown , 
Because of Date is different. 

 

Thanks & Regards

Jamsher

PaulDBrown
Community Champion
Community Champion

So which date/time needs to be shown? Machine 1 also has several date/time values





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






@PaulDBrown ,

We can create machine2_1 and machine2_2 colum it we have mutliple records for machine in same date 

 

Thanks & Regards

 

PaulDBrown
Community Champion
Community Champion

Sorry, I'm not following. You mean you want to show all the values for each date/time for each machine?





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Yes Mr. @PaulDBrown 

PaulDBrown
Community Champion
Community Champion

Can you post a link to a PBIX file with the sample data? the link you posted is to a file in which the data is unusable:

wrong.jpg

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Hi @PaulDBrown 

 

Uploading the pbix file. 

Download URL : CPU_PRODUCTION -New.pbix

Thanks & Regards

Jamsher

PaulDBrown
Community Champion
Community Champion

Why does machine 2 have two columns?





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Bhu1singh
Frequent Visitor

Hi,
You can transpose the table in Power Query,

1. Go to power query Editor>> right click on Machin_number column and say unPivot other columns

2. Then again select Machin_number column and in Tranformation menu select Pivot option.

You should get the table in desired format.

 

Thanks

Bhuvan

Hi @Bhu1singh ,

 

I did the steps as you mentioned. But getting below result. I can attached sample pbix file to download. 

 

Capture3.JPG

 

file download : CPU_PRODUCTION.pbix

 

Thanks & Regards

Jamsher

 

Hi @jkhan 

I dont have access to your data, can you past below steps in a blank query (data source) in power query editor. This is what I am suggesting to implement.

let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8k1MzsjMSzVU0lECY31DfSMDIyMgMzGlWClWB64CJGRkZAxWYwRXU5yGrAYkawJWYYwwBUOFKViFCYqKWAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Machine_Number = _t, Prod1 = _t, Prod2 = _t, Prod3 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Machine_Number", type text}, {"Prod1", Int64.Type}, {"Prod2", type date}, {"Prod3", type text}}),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Machine_Number"}, "Attribute", "Value"),
#"Grouped Rows" = Table.Group(#"Unpivoted Other Columns", {"Machine_Number", "Attribute"}, {{"Unique_Value", each List.Max([Value]), type any}}),
#"Pivoted Column" = Table.Pivot(#"Grouped Rows", List.Distinct(#"Grouped Rows"[Machine_Number]), "Machine_Number", "Unique_Value")
in
#"Pivoted Column"

 

Thanks

Bhuvan

@Bhu1singh 

 

I already uploaded the powerbi pbix file, Please download from below link. 

 

file download : CPU_PRODUCTION.pbix

Thanks & Regards

Jamsher

jkhan
Helper III
Helper III

Dear All,

 

Any hint please. 

 

Thanks & Regards

Jamsher

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.