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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
BAAJQH
Frequent Visitor

From Row to Column

Hello All
I have an urgent question that I unfortunately cannot find the answer to

I have a Dataset like the first picture
Now I would like to see the column status grouped in the column with the corresponding changeddate below it

as I show in the second picture

just to be clear i have about 10 different statuses (i am showing 4 now)
if anyone could help me I would be very happy
Kind regards, Bert

BAAJQH_0-1734176816736.png

 

BAAJQH_1-1734178341140.png

 

 

 

1 ACCEPTED SOLUTION
BAAJQH
Frequent Visitor

Hi 

Gökberk Uzuntaş

you are amazing I didn't know it would be that easy thanks again

// Bert

View solution in original post

5 REPLIES 5
BAAJQH
Frequent Visitor

Hi 

Gökberk Uzuntaş

you are amazing I didn't know it would be that easy thanks again

// Bert

Hello @BAAJQH ,

You're welcome. If you directly link the accepted solution, it will be easier for others to find it.

Best Regards,
Gökberk Uzuntaş

LinkedIn: https://www.linkedin.com/in/g%C3%B6kberk-uzunta%C5%9F-b43906198/

Medium: https://medium.com/@uzuntasgokberk

 

İf this post helps, then please consider Accept it as solution and kudos to help the other members find it more quickly.

uzuntasgokberk
Super User
Super User

Hello you can use below M Language I made an example. Copy the code and paste into advance editor.

"

let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8vMxNDU3NLCIN1DSUQp3DAgIAtKGJromukYGRkYKhsZWRuZWpkZKsTpoap39fbGqtrAyMkNSbWiA22RjQytjc0y1OEw2tbQyMFCKjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [PO_Rev = _t, status = _t, changedate = _t]),
#"Pivoted column" = Table.Pivot(Table.TransformColumnTypes(Source, {{"status", type text}}), List.Distinct(Table.TransformColumnTypes(Source, {{"status", type text}})[status]), "status", "changedate")
in
#"Pivoted column"
"
Original Data
uzuntasgokberk_0-1734179593526.png
Pivoted Data
uzuntasgokberk_1-1734179603849.png
This is where you can paste the code ı given
uzuntasgokberk_2-1734179616147.png

Example the code.

uzuntasgokberk_3-1734179631227.png

 

Best Regards,
Gökberk Uzuntaş

LinkedIn: https://www.linkedin.com/in/g%C3%B6kberk-uzunta%C5%9F-b43906198/

Medium: https://medium.com/@uzuntasgokberk

 

İf this post helps, then please consider Accept it as solution and kudos to help the other members find it more quickly.



Hi
thanks for the quick response
My knowledge in M ​​code is limited would it be possible for you to add the adjustment in my existing code

"

let
Bron = DremioCloud.DatabasesByServerV370("client.dremio.prod.gf.aws.scania.com:31010", null, null, null, null, "Enabled-PEM", []),
Cloud_Datalake.maximo_production_logistics.prod.raw_Schema = Bron{[Name="Cloud_Datalake.maximo_production_logistics.prod.raw",Kind="Schema"]}[Data],
postatus_View = Cloud_Datalake.maximo_production_logistics.prod.raw_Schema{[Name="postatus",Kind="View"]}[Data],
#"Rijen gefilterd" = Table.SelectRows(postatus_View, each ([orgid] = "NL")),
#"Samengevoegde kolom ingevoegd" = Table.AddColumn(#"Rijen gefilterd", "PO_Rev", each Text.Combine({[ponum], Text.From([revisionnum], "nl-NL")}, "_"), type text),
#"Removed Columns" = Table.RemoveColumns(#"Samengevoegde kolom ingevoegd",{"changeby", "memo", "orgid", "ponum", "postatusid", "revisionnum", "rowstamp", "siteid", "dl_import_timestamp"}),
#"Reordered Columns" = Table.ReorderColumns(#"Removed Columns",{"PO_Rev", "status", "changedate"})
in
#"Reordered Columns"

"

Best Regards,

Hello @BAAJQH ,

Well, ı dont know how the data was like in the beginning. So I would assume end of the your applied step your data is like below:

uzuntasgokberk_0-1734185523820.png

First select your column and then in the home section select pivot.

uzuntasgokberk_1-1734185574334.png

And your values needs to be date as your case without aggregated.

uzuntasgokberk_2-1734185607398.png

 

 

Best Regards,
Gökberk Uzuntaş

LinkedIn: https://www.linkedin.com/in/g%C3%B6kberk-uzunta%C5%9F-b43906198/

Medium: https://medium.com/@uzuntasgokberk

 

İf this post helps, then please consider Accept it as solution and kudos to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors