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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
KapGun
Regular Visitor

Code samples in this forum

How do you use

 

 

code sample

 

 

 

I keep getting error:

 

Your post has been changed because invalid HTML was found in the message body. The invalid HTML has been removed. Please review the message and submit the message when you are satisfied.

 

 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@KapGun Seems like it worked, I use it all the time without issue. Perhaps it is something regarding what you are typing or pasting into the code block? Perhaps try pasting it into Notepad first, then copy and paste from there to the code block.



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...

View solution in original post

6 REPLIES 6
KapGun
Regular Visitor

var test  "copy and paste from there to the code block."
lbendlin
Super User
Super User

Sadly, there is still no support for Power Query or DAX syntax highlighting.  But you can use the external formatters to make the code a bit easier to read.

Let's hope we'll get DAX and Power Query support soon.

Do you have any external formatters to recommend?

DAXformatter.com/raw

Powerqueryformatter.com

Greg_Deckler
Community Champion
Community Champion

@KapGun Seems like it worked, I use it all the time without issue. Perhaps it is something regarding what you are typing or pasting into the code block? Perhaps try pasting it into Notepad first, then copy and paste from there to the code block.



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...

Looks like it's working this way. Could have been something with code page or whatever.

I was simple enough to not think about this option, although I use it relulary when pasting stuff elesewhere 😁

Thanks.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.