Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAX formatter and 'tablename' #991

Closed
smedv1 opened this issue Sep 13, 2023 · 5 comments
Closed

DAX formatter and 'tablename' #991

smedv1 opened this issue Sep 13, 2023 · 5 comments
Assignees
Labels
issue: bug Confirmed as a bug in TE3
Milestone

Comments

@smedv1
Copy link

smedv1 commented Sep 13, 2023

If i use DAX-Formatter, then tablenames with '..' are removed
I have a status table with name status - as this is a reserved word, i have to write it with 'status'
when i use the DAX-Script function and the DAX-formatter symbol then 'status' is replaced with status, which results in an error in Power BI.

Tabular Editor 3, version: 3.10.1
Tabular Editor 3 edition: [Desktop]

@mlonsk mlonsk self-assigned this Sep 13, 2023
@mlonsk mlonsk added issue: under review Being looked into by TE team issue: awaiting reply More information is needed issue: bug Confirmed as a bug in TE3 and removed issue: under review Being looked into by TE team issue: awaiting reply More information is needed labels Sep 13, 2023
@mlonsk
Copy link
Collaborator

mlonsk commented Sep 13, 2023

Hi @smedv1

This is a bug, thank you for reporting it. We will fix it in our next release.

@otykier
Copy link
Collaborator

otykier commented Sep 13, 2023

Curse Microsoft for not properly documenting which names are reserved keywords :-(

@smedv1
Copy link
Author

smedv1 commented Sep 13, 2023

Ok, fine - by formatting with the dax formatter just leave the ' untouched, so don't have to deal with reserved keywords - but yes its annoying, that status seems to be an undocumented reserved word ;-)

@otykier
Copy link
Collaborator

otykier commented Sep 14, 2023

It's a matter of ensuring consistent code style - that's why the built-in DAX formatter may change how tables are quoted. By default, the formatter will only quote table names when they are needed (reserved keywords, table names containing special characters or spaces, etc.). But if you enable Always quote tables under Tools > Preferences > DAX Editor > Auto Formatting, quotes will always be added.

image

@mlonsk mlonsk added this to the 3.11.0 milestone Sep 14, 2023
@otykier
Copy link
Collaborator

otykier commented Sep 25, 2023

This is now fixed in 3.11.0. Thanks for reporting!

@otykier otykier closed this as completed Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Confirmed as a bug in TE3
Development

No branches or pull requests

3 participants