Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
When I use date_start as a variable in DAX I get following error:
But if I rename date_start to date_start2 or date_sta, it is fine.
So why there is an error when I use date_start?
Thanks
Solved! Go to Solution.
Hi @j_w,
By confirmed by PG, due to historical reasons, DAX parser started as an extension to MDX parser therefore automatically inherited all the MDX keywords. Since MDX parser was limited back in the old days, all MDX functions and metadata properties were added as keywords which unfortunately included DATE_START.
As a good coding convention, I recommend users to always prefix DAX variables with v or some other prefix the user prefers. So instead of DATE_START, the user could use vDateStart to make his code easy to read and maintain and also avoid accidental keyword collisions.
Best Regards,
Cherry
Hi @j_w,
By confirmed by PG, due to historical reasons, DAX parser started as an extension to MDX parser therefore automatically inherited all the MDX keywords. Since MDX parser was limited back in the old days, all MDX functions and metadata properties were added as keywords which unfortunately included DATE_START.
As a good coding convention, I recommend users to always prefix DAX variables with v or some other prefix the user prefers. So instead of DATE_START, the user could use vDateStart to make his code easy to read and maintain and also avoid accidental keyword collisions.
Best Regards,
Cherry
Hi @j_w,
I have had a contact with PG and will update here if I get any information.
Sorry for any inconvenience.
Best Regards,
Cherry
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
75 | |
62 | |
51 | |
47 |
User | Count |
---|---|
212 | |
82 | |
61 | |
60 | |
57 |