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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
sevenhills
Super User
Super User

Converting file data into columns - power query

Hi all,

 

I am combining multiple files, which are semistructured. I am providing sample data which I need to convert into columns. Any help is appreciated. The data looks like below:

 

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("zZhNc6IwHMa/SoZeq+YNEG9dtbM9bN90xoP1wNSsMqXgYDz0229CBMIUbA3pjhyQB0KeHyE8+Y/LpYOca+eZ7dKMg7vJCDw/zvu/0/0u4mHcn7BdmPF3lvA+guiFA3073jQJORsBDDHpQdpDSFxBwQhCveljuGHyPEj/ggA6q+ulg4VtfkAq/3nEY9HXIs3ewM1+H20SaQ1mW8Z43pYWN7nioKAc5RZS8SiMAYLKwCva+uJgnK4ZqJ4GfNqeDikPAbhLOMsS0Yt4rA95HtIB8gby6ZTARBMElsIdQF8TiGoCo1zkMEMB89n9m5v0xzpMoPt7uj/R/XVM7FcwgYDpfbEBtQelBvmuOpGrbiKHQVDQTMXbA9N3lm1Y8vrRPAq+mlo3CP56AmB2SPKhgRhX4wTxUBeBLpAmCNEFUhzI6BX9SQsO3eAEh45b58CKAxtxzA9MdYNq1u0cNeum8SBGHAu2PnLU3HQO0n6lJqjioGbjsT0cDVrfS+2pT3C4isM14rjNoga3uvC+x3F8L54RxyzkRTdan7Qm6FkcfhG06Lxwu2dsLSfJ4k0RIVKtGWLW6IJqAsPWZoGnOIKCCMtMGctMGW+jeJ2xZN/MQtz8Z+x5t7gtU2of1IlZ3fANYZuZ0oXDZqZ04bCZKV04bGZKFw6bmdKFw2amdOEoMwVfSKbgMlMI/H8FM9YKZoJKAnxGyUxIeRv9umgmbtnau6SymfiXVDeT4SUVzkROzQc50x+S1zRONy11808XzhReRuFMzRZb64UzNVtsrRfO1GyxtV44U7PF1nrhTM0WW+uFMy3/oaDnpduPLXJ0WBLJTLnqg+n9BFz1ndXqHw==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"File Row Number" = _t, #"Row Details" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"File Row Number", Int64.Type}, {"Row Details", type text}})
in
    #"Changed Type"

 

 

 

 

sevenhills_0-1681787621402.png

 

Dates are dynamic and each file will have different dates.

 

Output format expected:

   Data columns:

  • Report ID
  • Report Date Time
  • Report Title
  • Hospital
  • Code
  • Department
  • Quota
  • Internal
  • Date Range
  • Day
  • Value
  • Optional: Page Details

 

TIA

1 REPLY 1
lbendlin
Super User
Super User

I would suggest you ... run for the seven hills ...  (Sorry, could not resist)

 

Since the data is in fixed width you can split each line (row) by position as needed.  It will be a giant effort to set that up but it's not that complex.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors