Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

How to Convert Raw data to Structure data
06-04-2023
01:48 PM
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2023
11:36 PM

Hi,
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WUtJRiolxVIrViVbyS8xNBXKDwRznnMTiYiDPAswLTk0uyczPA/IhSjPyk5IyU0HyzmA+2BQnZFO8UUyxBPM880pSi1KLS4ACvmABx3SQUiMDhBnOyGZ4gDmJEEXGYE4x3CFOaA4JzsxLByKl2FgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Column 1" = _t, #"Column 2" = _t]),
Proper = Table.TransformColumns(Source,{{"Column 1", Text.Proper, type text}}),
Group = Table.Group(
Proper,
{"Column 1"},
{{"Data", each Table.PromoteHeaders(Table.Transpose(_))}},
GroupKind.Local,
(x,y) => if y[Column 1]="" then 1 else 0),
Formatted_Data = Table.Combine(Group[Data])
in
Formatted_Data
Stéphane
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2023
05:21 PM

import your date without headers, then try this code.
= Table.Combine(Table.Group(Source,"Column1",{"n",each let a=Table.Skip(_) in Table.FromRows({{[Column2]{0}}&a[Column2]},{"Category"}&List.Transform(a[Column1],Text.Proper))},0,(x,y)=>Byte.From(y=null))[n])

Helpful resources
Announcements
Power BI Monthly Update - July 2025
Check out the July 2025 Power BI update to learn about new features.
