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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
gauravnarchal
Post Prodigy
Post Prodigy

Data Layout

Hello

 

How can I change the layout of my data in the horizontal format?

 

The current layout of the data is as below.

 

unique_keyHeaderValue
1015422EMD ReasonSelect
1015422FF1M713810
1015422FF10NA
1015422FF13NA
1015422FF16TEST 1
1015422FF2CP214392
1015422FF20OPEN
1015422FF3NA
1015422FF33DEDW3EE
1015422FF45LONDON
1015422FF46200
1015422FF47KMKMHK9
1015422FF48Select
1015422FF75Select
1015422Traveller GuidHUHJI-HUHU-NKN-2342
1015423FF33NA
1015423FF46NA
1015423FF47NA
1015423Traveller Guid

NA

 

Required Layout

 

Unique KeyReasonFF1FF10FF13FF16FF2FF20FF3FF33FF45FF46FF47FF48FF75Traveller Guid
1015422SelectM713810NANATEST 1CP214392OPENNADEDW3EELONDON200KMKMHK9SelectSelectHUHJI-HUHU-NKN-2342
1015423    TEST   NA NANA  NA
1 ACCEPTED SOLUTION

3 REPLIES 3
Anonymous
Not applicable

Add a matrix to the report canvas and select "unique key" as row, "Header" as column and "Value" as value

 

Matrix.png

Ahmedx
Super User
Super User

pls try this

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("dZDLDoIwEEV/hbCGpC8ElkaKaG0hAnFBWBDtwoRogo/vt12BGbqZm94z6Z2ZrvMxwhEjxA98LjPvrIfX82EetR719e33wbIjz7GpMsY0wQgyZERtoU8d/sZIw+vGw4DZuqsIZjQlENqgsuIKEEcStX7GswvlHEAWGTmVKivhf8yOSBDclcVGhBSyECmEifuAceRizTR89Tjqydt/7jdjFG1xPISmtqESKiSULU9B583+Nqbz4Gt+vOaDaNvR/wA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [unique_key = _t, Header = _t, Value = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"unique_key", Int64.Type}, {"Header", type text}, {"Value", type text}}),
    #"Pivoted Column" = Table.Pivot(#"Changed Type", List.Distinct(#"Changed Type"[Header]), "Header", "Value")
in
    #"Pivoted Column"

to know how to do this watch my video

https://1drv.ms/v/s!AiUZ0Ws7G26RjHqLL9UiMeJZbQWb?e=OxWutM

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.