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
ppvinsights
Helper III
Helper III

Power Query/M Formatter

Hi Group,

 

we developed a formatter for M/PowerQuery a couple of weeks ago. You find it here:

https://powerqueryformatter.com

 

You can format M-code online or use our API - as we use the API for our (german) blog https://durchblick-durch-daten.de (formerly https://powerpivotinsights.de). 

Please give it a try - and if you have any suggestions or if you find any problems, do not hesitate to send a bug report (link is on the website).

Thanks,

Holger

9 REPLIES 9
Fzero3000
New Member

Hey I've been using your formatter for a while (it's a really helpful tool) but I noticed the website has been down for a few days 

 

everything okay? 

it is online again - sorry, some problems with google pages 😉

jzadok
Frequent Visitor

Hello. Has the PQ Formatting tool http://powerqueryformatter.com/ been retired?

 

I use fairly often and found the site appears to be down. Confirmed on another web browser and came to the same result. 

jzadok_0-1771436415983.png

 

it is online again - sorry, some problems with google pages 

 

Greg_Deckler
Community Champion
Community Champion

Very nice, I did something simple but it worked great! Turned this:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("dc3BCQAhDETRXnIWSWLGaC1i/21sFPawkJ3rY/hrkVAhqfwd7bIIIWopWVBPpZ1TKvob6keUU+OK+3NXQxvgyYC+ZremMgQT1hzeZ9h+AA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [z = _t, #"GAMMA (Excel)" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"z", type number}}),
    #"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"GAMMA (Excel)"})
in
    #"Removed Columns"

Into:

let
  Source = Table.FromRows(
    Json.Document(
      Binary.Decompress(
        Binary.FromText(
          "dc3BCQAhDETRXnIWSWLGaC1i/21sFPawkJ3rY/hrkVAhqfwd7bIIIWopWVBPpZ1TKvob6keUU+OK+3NXQxvgyYC+ZremMgQT1hzeZ9h+AA==", 
          BinaryEncoding.Base64
        ), 
        Compression.Deflate
      )
    ), 
    let
      _t = ((type text) meta [Serialized.Text = true])
    in
      type table[z = _t, #"GAMMA (Excel)" = _t]
  ),
  #"Changed Type" = Table.TransformColumnTypes(Source, {{"z", type number}}),
  #"Removed Columns" = Table.RemoveColumns(#"Changed Type", {"GAMMA (Excel)"})
in
  #"Removed Columns"

Much more readable and it had colors as well but those didn't paste over! Not your fault! 🙂



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi Greg,

 

what do you mean with "colors didn't paste over"? If you cut/paste it to something like "word", this is working. If you copy"html" you can use it on your webstie (with colors). Ok, using the powerquery - we do not have a change because this is text only 🙂

 

Holger

Yep @ppvinsights I figured it out, HTML copy, super cool


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

So cool, has a copy HTML feature so you CAN get the colors to paste over!! 🙂
 
let
  Source = Table.FromRows(
    Json.Document(
      Binary.Decompress(
        Binary.FromText(
          "dc3BCQAhDETRXnIWSWLGaC1i/21sFPawkJ3rY/hrkVAhqfwd7bIIIWopWVBPpZ1TKvob6keUU+OK+3NXQxvgyYC+ZremMgQT1hzeZ9h+AA==", 
          BinaryEncoding.Base64
        ), 
        Compression.Deflate
      )
    ), 
    let
      _t = ((type text) meta [Serialized.Text = true])
    in
      type table[z = _t, #"GAMMA (Excel)" = _t]
  ),
  #"Changed Type" = Table.TransformColumnTypes(Source, {{"z", type number}}),
  #"Removed Columns" = Table.RemoveColumns(#"Changed Type", {"GAMMA (Excel)"})
in
  #"Removed Columns"


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Just added this to my favorites bar!


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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.