Comment not Considering in TM1 MDX Command

Post Reply
sachinvpatil26
Posts: 3
Joined: Mon Jul 30, 2018 8:53 am
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2016

Comment not Considering in TM1 MDX Command

Post by sachinvpatil26 »

PLEASE POST IN THE CORRECT FORUM

Dear Experts,
We have a tool for executing the MDX queries. We observed that the comments styles "//" and "--" not working. The /*TEXT */ comment is working fine.
Here are the sample exapmples
/* Column Selection */ SELECT NON EMPTY { [Time].[Alle Jahre], [Time].[2014], [Time].[2015], [Time].[2016]} ON COLUMNS,
/* Row Selection */ NON EMPTY { [Product].[All Products] } ON ROWS
/* Cube */ FROM [Sales] /*Comment*/
/*Background Selection */ WHERE ([Customer].[All Customers], [Currency].[Group Currency],[Category].[All Categories], [SalesOrg].[Pantara Holding], [Measure].[Margin2])

This works fine. However if we try to add below two lines then TM1 server gives the error
// My Comment
/* Column Selection */SELECT NON EMPTY { [Time].[Alle Jahre], [Time].[2014], [Time].[2015], [Time].[2016]} ON COLUMNS,
/* Row Selection */ NON EMPTY { [Product].[All Products] } ON ROWS
/* Cube */ FROM [Sales] /*Comment*/ /*Background Selection */ WHERE ([Customer].[All Customers], [Currency].[Group Currency],[Category].[All Categories], [SalesOrg].[Pantara Holding], [Measure].[Margin2])

// My Comment 1
-- My Comment 2
/* Column Selection */SELECT NON EMPTY { [Time].[Alle Jahre], [Time].[2014], [Time].[2015], [Time].[2016]} ON COLUMNS,
/* Row Selection */ NON EMPTY { [Product].[All Products] } ON ROWS /* Cube */ FROM [Sales] /*Comment*/
/*Background Selection */ WHERE ([Customer].[All Customers], [Currency].[Group Currency],[Category].[All Categories], [SalesOrg].[Pantara Holding], [Measure].[Margin2])

TM1 gives the error for above two MDX Statement.
Can you please suggest if the comments style "--" and "//" works with TM1 in MDX?
lotsaram
MVP
Posts: 3651
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Comment not Considering in TM1 MDX Command

Post by lotsaram »

Just because -- and // work in native SSAS doesn't mean it will work in TM1. Yes TM1 supports MDX, but this doesn't mean it supports every nuance that Microsoft's implementation does.
As long as /* comment */ works then what, if any is your problem?
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
Post Reply