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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ChrisW3
Frequent Visitor

DAX Comments in Power Pivot Measures

Is there a way to use comments in DAX measure formulas in Power Pivot? I tried both //...., and /*...*/, and while they show up in blue initially and seem to be understood as a comment, they disappear when the model calculates.

2 REPLIES 2
Arturo24
Frequent Visitor

Measure := //Apparently this comment will also disappear

SUM ([AMOUNT])

ChrisW3
Frequent Visitor

I figured out the solution to this. Sharing in case anyone else runs into the same problem. It seems that Power Pivot will remove comments in DAX code if they are not on a single line, and the single line has to be surrounded by other lines (can't be the last line). Seems like a strange bug. Why can't I end my code with a comment?

 

Measure:=SUM([Amount]) //This comment will be deleted by power pivot

 

Measure:=SUM([Amount])

               //This comment will also be delted by power pivot

 

Measure:=SUM([Amount])

              //This comment will be maintained because the next line is not blank

             +0

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.