TM1 Rest api - MDX query for zero suppression

Post Reply
kavitha2002
Community Contributor
Posts: 180
Joined: Sat May 05, 2018 11:48 am
OLAP Product: tm1
Version: 10.3.10100.8
Excel Version: 14

TM1 Rest api - MDX query for zero suppression

Post by kavitha2002 »

Hello Everyone,

I would like retrieve the cellsets with zero suppressed using MDX query. I dont have any idea on how to achieve.

Any hints or ideas, would be appreciated. Thanks
User avatar
macsir
MVP
Posts: 782
Joined: Wed May 30, 2012 6:50 am
OLAP Product: TM1
Version: PAL 2.0.9
Excel Version: Office 365
Contact:

Re: TM1 Rest api - MDX query for zero suppression

Post by macsir »

SELECT
NON EMPTY {[DimCP_Population].[Dr Key].[Dr Key]}
ON rows,
{
[Measures].[PatientCnt] ,[Measures].[TotalPatientCnt]
,[Measures].[PrevalencePercent]

}
ON columns
FROM [StrategyCompanionDWCube]
In TM1,the answer is always yes though sometimes with a but....
http://tm1sir.blogspot.com.au/
kavitha2002
Community Contributor
Posts: 180
Joined: Sat May 05, 2018 11:48 am
OLAP Product: tm1
Version: 10.3.10100.8
Excel Version: 14

Re: TM1 Rest api - MDX query for zero suppression

Post by kavitha2002 »

Hi @macsir,

Thanks a lot, it worked...

I want the zero suppression for both columns and rows, so added NON EMPTY for column as well in below.. its working..

SELECT
NON EMPTY {[DimCP_Population].[Dr Key].[Dr Key]}
ON rows,
NON EMPTY {
[Measures].[PatientCnt] ,[Measures].[TotalPatientCnt]
,[Measures].[PrevalencePercent]

}
ON columns
FROM [StrategyCompanionDWCube]


Is there a way to get only the row elements which is non-zero ?? Is it possible??
User avatar
macsir
MVP
Posts: 782
Joined: Wed May 30, 2012 6:50 am
OLAP Product: TM1
Version: PAL 2.0.9
Excel Version: Office 365
Contact:

Re: TM1 Rest api - MDX query for zero suppression

Post by macsir »

I don't quite get your point of getting only the row elements which is non-zero???
In TM1,the answer is always yes though sometimes with a but....
http://tm1sir.blogspot.com.au/
Wim Gielis
MVP
Posts: 3113
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: TM1 Rest api - MDX query for zero suppression

Post by Wim Gielis »

I do understand it and it’s something I would like to do as well but in the Cube viewer. It’s the set of elements within the rows (and columns) dimension(s) that survive the zero suppression operation, and only those elements. It’s so terribly inefficient to snapshot to Excel and copy-paste back the found elements. Or worse, select those elements manually in the Subset Editor. Or write MDX expressions for it.

I tried to write an AutoHotkey script for it, to no avail.

In PA we can do a “Keep”, though.

You get the idea :)
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
lotsaram
MVP
Posts: 3652
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: TM1 Rest api - MDX query for zero suppression

Post by lotsaram »

Wim Gielis wrote: Fri Mar 29, 2019 6:46 am I do understand it and it’s something I would like to do as well but in the Cube viewer. It’s the set of elements within the rows (and columns) dimension(s) that survive the zero suppression operation, and only those elements. It’s so terribly inefficient to snapshot to Excel and copy-paste back the found elements. Or worse, select those elements manually in the Subset Editor. Or write MDX expressions for it.
Yep! The fact that the Architect/Perspectives cube viewer doesn't allow selecting row and column members to be able to copy to the clipboard is quite an annoying design fail.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
Post Reply