Forum Discussion
Commenting out first line in DAX
- 2 years ago
In DAX , the standard way to add comments is either using two forward slashes `//` for single-line comments or the `/* */` syntax for multi-line comments. These comments are generally used to explain the code, making it easier to understand its purpose and functionality.
However, it's important to note that DAX comments are typically not allowed in the names of measures or columns themselves. When you attempt to create a measure and start the definition with a comment, the Power BI or Analysis Services environment might interpret your comment as part of the measure's name if the comment is placed directly above the measure definition without a blank line or is not properly recognized by the editor you're using.
Rejected Closed 2 = // put your comment here VAR RC = SUM('FACT CLAIM'[closed_rejected_count]) RETURN RC
Hi,
Comments before measure names is not supported, you can add it after the measure name, on a new line before the statement: