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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.