MDX keywords are not changing color in the calculation script in SQL Server Data Tools – preview version for Visual Studio 2015. Hopefully this is a temporary issue and will be fixed in the release version. Having different keyword colors than the rest of the code makes it much easier to read, write and maintain the calculation script especially in larger implementations.

SSDT Preview for VS 2015

The following picture shows how the Adventure Works calculation script looks like when using SSDT Preview for VS 2015 at the time of writing this post. Everything is in black with a grey background.

SSDT_2015_No_MDX_Keyword_Highlighting

I am using SQL Server 2016 Release Candidate (RC) 1 and the latest version of  the SSDT which can be found here: https://msdn.microsoft.com/en-us/library/mt204009.aspx. The latest version of SSDT tested for this post is 14.0.60316.0. Please note that unlike previous versions there seems to be only one single download/install available for SSDT. Previous versions made a distinction between SSDT and SSDT for Business Intelligence (SSDT-BI).  Previously SSDT only supported SQL Server Relational database projects and SSDT – BI supported all business intelligence project types. This does not seem to be the case at least with the preview version.

SSDT – BI for VS 2013

Compare the keyword colors between the above picture and the following picture which shows the calculation script in SSDT – BI for VS 2013:

SSDT_2013_With_MDX_Keyword_Highlighting

This script is much easier to read! Fortunately previous versions of SSDT are still available for download from here: https://msdn.microsoft.com/en-us/library/mt674919.aspx. Since SSDT – BI for VS 2013 seems to work fine with SQL Server 2016 (RC) 1, that’s what I will be using for SSAS development until the keyword colors are fixed in SSDT for VS 2015.

SSDT – BI for VS 2012

A similar problem existed with SSDT – BI in Visual Studio 2012. With SSDT – BI 2012, the script changed the color of comments and all the MDX keywords to green! (See next picture).  As a result most developers opted to use Visual Studio 2008 even against SQL Server 2012 to avoid using the black and grey script. (SSDT – BI was called Business Intelligence Development Studio or BIDS in VS 2008.)

This issue was reported to Microsoft Connect and is currently marked as closed: https://connect.microsoft.com/SQLServer/feedback/details/841790/ssdt-2012-analysis-services-cube-project-calculation-page-color-formatting

I installed SSDT -BI for VS 2012 to see if the problem is fixed as reported by Microsoft Connect. The following shows the Adventure Works calculation script in SSDT -BI  for VS 2012:

SSDT_2012_With_Partial_MDX_Keyword_Highlighting

It seems like the green MDX keyword colors still exist at least in the version I was able to download.

Versions of SSDT for VS tested for this post

The following pictures show the version information for the different SSDT that I tested for this post. As mentioned previously, there seems to be only one download of SSDT available for VS 2015 that has combined the database project and BI project support.

SSDT for VS 2015

Here you can see the BI version under SQL Server Analysis Services and SQL Server Reporting Services and the relational database project version under SQL Server Data Tools.

SSDT_Feb_2016_Preview_For_VS2015_Version_Info

The following pictures show the types of project that become available with the download of the latest version of SSDT for VS 2015:

 SSDT – BI for Visual Studio 2013

I have not installed the non-BI SSDT.

SSDT_VS2013_Version_Info

 SSDT – BI for Visual Studio 2012

Here I have not installed the non-BI SSDT.

SSDT_VS2012_Version_Info