Hi Everyone,
Im trying to include another piece to my MDX statement that has a measure called "Exclude". So far my MDX statement is as as follows:
{FILTER({TM1SUBSETALL([PPD_Fixed Cost Account])}, [PPD_Fixed Cost Mapping].( [FPS_Department].[161003], [PPD_Fixed Cost Mapping Measure].[BLI Flag]) >0)}
I also want to add to the MDX that has [PPD_Fixed Cost Mapping Measure].[Exclude] <> 'Y'. Im assuming there is an AND or an OR statement. I am stuck so any help would be much appreciated.
thanks
Hiten
TM1 MDX with AND/OR statement
-
- MVP
- Posts: 1831
- Joined: Mon Dec 05, 2011 11:51 am
- OLAP Product: Cognos TM1
- Version: PA2.0 and most of the old ones
- Excel Version: All of em
- Location: Manchester, United Kingdom
- Contact:
Re: TM1 MDX with AND/OR statement
For "AND" you just wrap the extra filter by around it (or inside it) etc.hpansar wrote:Hi Everyone,
Im trying to include another piece to my MDX statement that has a measure called "Exclude". So far my MDX statement is as as follows:
{FILTER({TM1SUBSETALL([PPD_Fixed Cost Account])}, [PPD_Fixed Cost Mapping].( [FPS_Department].[161003], [PPD_Fixed Cost Mapping Measure].[BLI Flag]) >0)}
I also want to add to the MDX that has [PPD_Fixed Cost Mapping Measure].[Exclude] <> 'Y'. Im assuming there is an AND or an OR statement. I am stuck so any help would be much appreciated.
thanks
Hiten
For "OR" you can use union. It is also discussed quite extensively on this forum.
Start reading this for reference:
http://www.bihints.com/book/export/html/68
Declan Rodger
-
- Community Contributor
- Posts: 165
- Joined: Tue Apr 02, 2013 1:41 pm
- OLAP Product: tm1, cognos bi
- Version: from TM1 9.4 to PA 2.0.9.6
- Excel Version: 2010
- Location: Toronto, ON
Re: TM1 MDX with AND/OR statement
Did you try:hpansar wrote:Hi Everyone,
Im trying to include another piece to my MDX statement that has a measure called "Exclude". So far my MDX statement is as as follows:
{FILTER({TM1SUBSETALL([PPD_Fixed Cost Account])}, [PPD_Fixed Cost Mapping].( [FPS_Department].[161003], [PPD_Fixed Cost Mapping Measure].[BLI Flag]) >0)}
I also want to add to the MDX that has [PPD_Fixed Cost Mapping Measure].[Exclude] <> 'Y'. Im assuming there is an AND or an OR statement. I am stuck so any help would be much appreciated.
thanks
Hiten
{FILTER({TM1SUBSETALL([PPD_Fixed Cost Account])}, [PPD_Fixed Cost Mapping].( [FPS_Department].[161003], [PPD_Fixed Cost Mapping Measure].[BLI Flag]) >0 OR [PPD_Fixed Cost Mapping].( [FPS_Department].[161003], [PPD_Fixed Cost Mapping Measure].[Exclude]) <> "Y")}
Ardian Alikaj
- Steve Rowe
- Site Admin
- Posts: 2464
- Joined: Wed May 14, 2008 4:25 pm
- OLAP Product: TM1
- Version: TM1 v6,v7,v8,v9,v10,v11+PAW
- Excel Version: Nearly all of them
Re: TM1 MDX with AND/OR statement
I've found Except really useful in this type of situation allowing you to subtract one subset from another.
The MDX primer is (should be) required reading for any developer, an excellent piece of work!
The MDX primer is (should be) required reading for any developer, an excellent piece of work!
Technical Director
www.infocat.co.uk
www.infocat.co.uk