Arc - MDX Lab - code formatter removes spaces between certain keywords
Version Information (please complete the following information):
- Operating System: Windows 10
- TM1 Version: 11.8.19 (not important)
- Browser: N/A
- Arc clients: Desktop
- Arc Version: 3.5.1
- Excel Version: N/A
Describe the bug
Using Arc's MDX code formatter in MDX Lab I noticed a couple of issues when trying to format a (test) MDX:
- When I have an ‘ON AXIS(0)’ at the end of the axis definition (in this case there is only one axis defined in the MDX), the formatter will take the space out and change it to ‘ONAXIS(0)’ which subsequently breaks the syntax of the overall MDX and,
- When I have one or more [WITH] ‘MEMBER xxx AS yyy’ statements in my query it again takes away any space[s] (any whitespace for that matter) following the AS, again breaking the query
BTW If I uncheck “Separate Keywords” it even takes more spaces/whitespace out where there definitely should be at least a space.
To Reproduce
Steps to reproduce the behavior:
- Go to the MDX Lab tool under any TM1 server connection you might have open
- Past any MDX containing any of the above, or this MDX I was using:
WITH MEMBER [Measures].[inf] AS '8.0/0.0' MEMBER [Measures].[-inf] AS '-8.0/0.0' SELECT {[Measures].[inf], [Measures].[-inf]} ON AXIS(0) FROM [Sales]
- Hit the 'Format Code' button on the toolbar or press 'Alt+Shift+F'
- See the issue with the missing spaces
WITH
MEMBER [Measures].[inf] AS'8.0/0.0'
MEMBER [Measures].[-inf] AS'-8.0/0.0'
SELECT
{[Measures].[inf], [Measures].[-inf]} ONAXIS(0)
FROM
[Sales]
Expected behavior
I'd expect the a space in those places where there is one needed, in this case of the test query above I'd expect it to look as:
WITH
MEMBER [Measures].[inf] AS '8.0/0.0'
MEMBER [Measures].[-inf] AS '-8.0/0.0'
SELECT
{[Measures].[inf], [Measures].[-inf]} ON AXIS(0)
FROM
[Sales]