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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Jeanxyz
Power Participant
Power Participant

var syntax

I am reading the DAX written by another colleague, i'm wondering what does "--" mean here. It seems to me hte last line of code (green highlights) are not executed. Maybe it's just notes of the developer?

 

Recorded Time M2 =

VAR cy = filter(Dim_Date,max(Dim_Date[Year])=Dim_Date[Year])

var result =

sum('Fact_Timesheets'[Recorded Time])

return

if(result = 0,blank(),result)

--CALCULATE(sum('Fact_Timesheet'[Recorded Time]),'Fact_Timesheet'[Time Category]<>"Valuation Result",cy)

1 ACCEPTED SOLUTION
SanketBhagwat
Solution Sage
Solution Sage

Hi @Jeanxyz .

 

Yes you are right, // and -- are used in a DAX statement to highlight as a note or a comment.

 

Regards,

Sanket Bhagwat.

 

If this post answers your question, then please mark it as 'Accept as Solution'.

View solution in original post

1 REPLY 1
SanketBhagwat
Solution Sage
Solution Sage

Hi @Jeanxyz .

 

Yes you are right, // and -- are used in a DAX statement to highlight as a note or a comment.

 

Regards,

Sanket Bhagwat.

 

If this post answers your question, then please mark it as 'Accept as Solution'.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.