Skip to main content

Smart Paste

When pasting DAX queries in from other sources it is possible that the text may have issues which requires fixing before the queries can be run.

When pasting into the edit pane in DAX Studio the editor performs the following actions:

  • Make sure no lines are longer than 500 characters - There are 2 reasons for breaking lines at 500 characters.
    1. Readability. Very long lines are usually generated by some process and are hard for a person to read.
    2. Performance. The syntax highlighting in DAX Studio is only applied for the visible lines, but extremely long lines can cause it to hang the UI for an extended period
  • Replace unicode spaces with ascii spaces - non-standard spaces will cause the tabular engine to throw "invalid token" errors which are very hard to understand since you cannot see the difference between the different types of whitespace.
  • Replace "smart quotes" with standard ascii quotes - smart quotes break DAX expressions since the text inside them is no longer treated as a "string" or 'table name'.