MDX: Filtering on negative values
Posted: Thu Aug 26, 2021 4:59 pm
I'm trying to make a view using MDX that will show all negative values in a cube. I'm quite new to MDX and I'm failing badly at this so far. I'm hoping some kind soul can point me in the right direction.
I'm using Wim's guide to learn, check it here. The example provided for filtering on cube values is below:
On my end, the cube is called Operator Model and has these dimensions:
Here's my stab at the MDX which is, of course, absolutely wrong. I attempted to put the filter in the first part of the statement, the column area.
The MDX editor won't tell me where it is wrong, it just barfs. Any ideas?
I'm using Wim's guide to learn, check it here. The example provided for filtering on cube values is below:
Code: Select all
{ Filter ( TM1FilterByLevel ( TM1SubsetAll( [PL_Account] ) , 0 )
, [BalanceSheet].( [FIN_Year].[2021]
, [FIN_Period].[P07]
, [FIN_Scenario].[Actual]
, [BS_Measures].[Amount] ) <> 0 )
}
Code: Select all
Version, Country, Month, Operator, Platform, Resolution, Adjustment, Operator Model Measures
Code: Select all
SELECT
NON EMPTY
{ FILTER (
TM1FILTERBYPATTERN ( { TM1FILTERBYLEVEL ( { TM1SUBSETALL ( [Month] ) } , 0 ) }
, "Dec ????" )
, [Operator Model].( [Version].[Current]
,[Operator Model Measures].[Digital Subscribers]
) < 0 ) }
ON 0,
NON EMPTY
{ TM1SubsetToSet ( [Country].[Country] , "All Country N Elements" , "public" ) }
* { TM1SubsetToSet ( [Operator].[Operator] , "All Operator N Elements" , "public" ) }
* { TM1SubsetToSet ( [Platform].[Platform] , "All Platform N Elements" , "public" ) }
ON 1
FROM [Operator Model]
WHERE ( [Adjustment].[Adjustment].[Final]
, [Resolution].[Resolution].[Total Resolution]
, [Version].[Version].[Actual]
, [Operator Model Measures].[Operator Model Measures].[Digital Subscribers]
)