cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
skasper Advocate V
Advocate V

DAX syntax highlighting in Notepad++

Hi,

 

ever since my DAX statements got more advanced, I found the code window in Power BI Desktop too small and wanted to use Notepad++ for it. Alas, there is no pre-defined syntax highlighting for DAX. So I went ahead and created my own. I share instruction on how to do that and also the already prepared XML file for easy import into Notepad++ over here: www.sascha-kasper.com/dax-syntax-highlighting-for-notepad/

 

You can have DAX syntax highlighing inside Notepad++ within 1 minute after reading this.

 

I hope it helps you as it helps me.

Best - Sascha
Please always mark accepted solutions. It helps others with similar questions or problems. Thank you.
3 ACCEPTED SOLUTIONS

Accepted Solutions
skasper Advocate V
Advocate V

Re: DAX syntax highlighting in Notepad++

Thank you. I am glad you find it useful.

 

I am currently working on auto-complete, but this seems a bit buggy.

Best - Sascha
Please always mark accepted solutions. It helps others with similar questions or problems. Thank you.

View solution in original post

skasper Advocate V
Advocate V

Re: DAX syntax highlighting in Notepad++

Hi again,

 

I updated the DAX.xml file for Notepad++. It now also offers AutoComplete.

Just download it again and replace the old one.

Make sure you use the latest version (2.05) by checking the comment inside the file.

Let me know, if it works.

Best - Sascha
Please always mark accepted solutions. It helps others with similar questions or problems. Thank you.

View solution in original post

skasper Advocate V
Advocate V

Re: DAX syntax highlighting in Notepad++

Updated the file (now version 3.01) to include

  • Parameters
  • Return Value
  • Description

See the screenshots in the updated post for details.

I did only preliminary testing, so if you find any issues, please let me know.

Best - Sascha
Please always mark accepted solutions. It helps others with similar questions or problems. Thank you.

View solution in original post

15 REPLIES 15
Super User IV
Super User IV

Re: DAX syntax highlighting in Notepad++

This is great. The only issue that I had is that every time I click on Styler in the 64-bit version of Notepad++ it errors out, but that's not your issue! Thanks for putting this together!! The import worked awesome, that's definitely the way to go!!


---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

skasper Advocate V
Advocate V

Re: DAX syntax highlighting in Notepad++

Thank you. I am glad you find it useful.

 

I am currently working on auto-complete, but this seems a bit buggy.

Best - Sascha
Please always mark accepted solutions. It helps others with similar questions or problems. Thank you.

View solution in original post

skasper Advocate V
Advocate V

Re: DAX syntax highlighting in Notepad++

Hi again,

 

I updated the DAX.xml file for Notepad++. It now also offers AutoComplete.

Just download it again and replace the old one.

Make sure you use the latest version (2.05) by checking the comment inside the file.

Let me know, if it works.

Best - Sascha
Please always mark accepted solutions. It helps others with similar questions or problems. Thank you.

View solution in original post

skasper Advocate V
Advocate V

Re: DAX syntax highlighting in Notepad++

Updated the file (now version 3.01) to include

  • Parameters
  • Return Value
  • Description

See the screenshots in the updated post for details.

I did only preliminary testing, so if you find any issues, please let me know.

Best - Sascha
Please always mark accepted solutions. It helps others with similar questions or problems. Thank you.

View solution in original post

zapppsr Helper V
Helper V

Re: DAX syntax highlighting in Notepad++

I tried the step by step screenshots, but I guess it skips to a part where you should have loaded the XML file and doesn't show how to do it. Only at the end of the post it says how to import.

 

Somehow, I imported but the functions don't appear in the supposed box.

 

What am I doing wrong?

 

I'm using Notepad++ 7.5.6 64-bits

skasper Advocate V
Advocate V

Re: DAX syntax highlighting in Notepad++

Hi @zapppsr,

thank you for pointing this out. I just updated the blog post to include a screenshot showing the 3 clicks for importing the XML file (I am using the same Notepad++ version as you).

 

I also double-checked the file and after importing it, highlighting and auto-complete work as they should. If you keep experiencing issues, please check the Notepad++ Wiki (http://docs.notepad-plus-plus.org/index.php/Main_Page).

Best - Sascha
Please always mark accepted solutions. It helps others with similar questions or problems. Thank you.
skasper Advocate V
Advocate V

Re: DAX syntax highlighting in Notepad++

Thank you @Greg_Deckler. Much appreciated. Glad it helps.

Best - Sascha
Please always mark accepted solutions. It helps others with similar questions or problems. Thank you.
zapppsr Helper V
Helper V

Re: DAX syntax highlighting in Notepad++

Hi @skasper,

 

Thanks for replying and updating the post so quickly.

Maybe because I'm new to Notepad++ I missed the step where I should select the DAX language after Importing it.

Your new screen is good, but I would highlight for noobs like me that I have to select the language after importing...

Other than that, thanks a lot for providing this!

 

Highlighted
skasper Advocate V
Advocate V

Re: DAX syntax highlighting in Notepad++

true. I added a sentence or two to explain this, too. Enjoy!

Best - Sascha
Please always mark accepted solutions. It helps others with similar questions or problems. Thank you.

Helpful resources

Announcements
Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

April 2020 Community Highlights

April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.