Skip to main content
Microsoft Idea

Power BI

New

Allow trailing commas in DAX code for easier debugging

Vote (1) Share
Charles Georges's profile image

Charles Georges on 02 Mar 2023 15:41:41

Debugging DAX code sometimes requires to comment out a line, like a filter parameter in a CALCULATE function. Allowing a trailing comma after the last parameter in DAX functions would prevent DAX throwing an error when removing the last parameter.


Some people advocate for commas at the beginning of each line for this reason. DAX Studio even has an option to move commas to the beginning of the line. This less an ideal workaround would not be necessary if DAX allowed for trailing commas, just like Python does.