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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
stribor45
Post Prodigy
Post Prodigy

DAX Studio space after function name

Why cant i get this working? I am trying to have a space after the function name but no luck in DAX Studio even  though setting is there (see attached)

stribor45_0-1772333519516.png

 

-- NOT THIS
EVALUATE
ADDCOLUMNS(
    VALUES( CUSTOMER[Gender] ),
    "@Read Sales",
        CALCULATE(
            [SALES AMOUNT],
            'Product'[Color] = "Red"
        )
)

-- BUT THIS
EVALUATE
ADDCOLUMNS (
    VALUES ( CUSTOMER[Gender] ),
    "@Read Sales",
        CALCULATE (
            [SALES AMOUNT],
            'Product'[Color] = "Red"
        )
)

 

1 ACCEPTED SOLUTION
pcoley
Continued Contributor
Continued Contributor

If you already have it unchecked and reformatting (via the toolbar lightning bolt icon, Ctrl+K Ctrl+D, or right-click → Format DAX) still produces no space after the function names, here are the most common reasons this happens and how to fix it:

  1. The change wasn't applied / needs a restart After toggling the checkbox → click OK or Apply → close and reopen DAX Studio completely. Then paste your code fresh and format it again. Some users report the setting doesn't take effect until a full restart.
  2. You're using an outdated version of DAX Studio The option was added around early 2020 (following SQLBI's formatting rule update). If you're on a very old build (pre-3.x), it might not exist or behave inconsistently. → Go to Help → Check for Updates (or download the latest from https://daxstudio.org). As of 2026, grab the current release — it definitely supports this reliably.
  3. The code already has no spaces, or formatting is set to "Best Practice" style Some versions / integrations default to the modern SQLBI "no space after function" rule. Try this test:
    • Paste exactly this (with spaces already there):
       
       
      EVALUATE
      ADDCOLUMNS ( VALUES ( 'Customer'[Gender] ), "Test", CALCULATE ( [Sales Amount] ) )
       
       
    • Format it. If it removes the spaces → the setting is being ignored or overridden. If it keeps them → good, the option is working; your original code might just need manual spaces added first before formatting.
Regards, PColey 
I hope this helps.
Please Mark my post as a solution if it helped to resolve your issue.
Kudos are Welcome!
Please do let us know if you have any further queries.

View solution in original post

7 REPLIES 7
v-ssriganesh
Community Support
Community Support

Hi @stribor45,
Thank you for posting your query in the Microsoft Fabric Community Forum.

As per my understanding, the “Skip space after function name” setting primarily prevents the formatter from removing spaces if they already exist; it doesn't automatically insert them into code that lacks them. So if the original code has no space (like ADDCOLUMNS(), formatting won't add one even when the option is off but once you add it (manually or via Find/Replace), future formatting will preserve it.

For official details, check these references:

If adding spaces via Ctrl+H (Find: ( → Replace: () once per query works for you, that's the quickest workaround and Thanks, @pcoley@OwenAuger & @FBergamaschi for sharing valuable insights.


Best regards,
Ganesh Singamshetty.

Thank you for sharing this documentation as i was aware of it and looked at it before posting. I was more interested why it is noted in the settings  "Skip space after function name" this way and I guess I misunderstood what it does. 

 

Thank you for your response

OwenAuger
Super User
Super User

Hi @stribor45 

I believe that "Skip space after function name" should be turned off if you want a space between function name and the opening parenthesis. At least it appears to work that way when I tested it just now.

 

"Skip space" here means "do not include space", rather than "skip one character space to the right after function name".

 

Perhaps the option could be renamed 😉


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

yeah i tried it with off before i posted didnt make difference. i switched it again before making this post this is what i see

stribor45_0-1772390708642.png

 

pcoley
Continued Contributor
Continued Contributor

If you already have it unchecked and reformatting (via the toolbar lightning bolt icon, Ctrl+K Ctrl+D, or right-click → Format DAX) still produces no space after the function names, here are the most common reasons this happens and how to fix it:

  1. The change wasn't applied / needs a restart After toggling the checkbox → click OK or Apply → close and reopen DAX Studio completely. Then paste your code fresh and format it again. Some users report the setting doesn't take effect until a full restart.
  2. You're using an outdated version of DAX Studio The option was added around early 2020 (following SQLBI's formatting rule update). If you're on a very old build (pre-3.x), it might not exist or behave inconsistently. → Go to Help → Check for Updates (or download the latest from https://daxstudio.org). As of 2026, grab the current release — it definitely supports this reliably.
  3. The code already has no spaces, or formatting is set to "Best Practice" style Some versions / integrations default to the modern SQLBI "no space after function" rule. Try this test:
    • Paste exactly this (with spaces already there):
       
       
      EVALUATE
      ADDCOLUMNS ( VALUES ( 'Customer'[Gender] ), "Test", CALCULATE ( [Sales Amount] ) )
       
       
    • Format it. If it removes the spaces → the setting is being ignored or overridden. If it keeps them → good, the option is working; your original code might just need manual spaces added first before formatting.
Regards, PColey 
I hope this helps.
Please Mark my post as a solution if it helped to resolve your issue.
Kudos are Welcome!
Please do let us know if you have any further queries.

After I pasted your coded from #3 and formatted it spaces remained. Your statement "your original code might just need manual spaces added first before formatting" what does that mean? I have to manually add the space after the function name? What is the point of this setting then?

I confrim what @OwenAuger  wrote

 

I also tested your code in DAXformatter.com, there there is no need of any special setting and it works, of course it is more time consuming but just to mention that

 

If this helped, please consider giving kudos and mark as a solution

@me in replies or I'll lose your thread

Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page

Consider voting this Power BI idea

Francesco Bergamaschi

MBA, M.Eng, M.Econ, Professor of BI

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.