I have this issue with an MDX query where the NON EMPTY clause isn’t working as I expected after adding KPI goals, trends and status to the query. The basic query looks like this
SELECT
NON EMPTY({[Measure1], [Measure2], KPIValue('MyKpi')})
ON COLUMNS,
NON EMPTY [Dim Country].[Name].[Name].ALLMEMBERS ON ROWS
FROM [BIA CO]
returning something like this, which is fine:
Measure1 Measure2 MyKpi Canada 7977 4487 3231 USA 6 14 6 UK 442 1179 180
Problems comes when I add KPI goal, trend and status:
SELECT
NON EMPTY({[Measure1], [Measure2], KPIValue('MyKpi'), KPIGoal('MyKpi'), KPIStatus('MyKpi'), KPITrend('MyKpi')})
ON COLUMNS,
NON EMPTY [Dim Country].[Name].[Name]ALLMEMBERS ON ROWS
FROM [BIA CO]
Which returns something like:
Measure1 Measure2 MyKpi MyKpi Goal MyKpi Status MyKpi Trend Mexico (null) (null) (null) 40300 -1 -1 Cuba (null) (null) (null) 40300 -1 -1 Canada 7977 4487 3231 40300 -1 1 Portugal (null) (null) (null) 40300 -1 -1 China (null) (null) (null) 40300 -1 -1 USA 6 14 6 40300 -1 1 UK 442 1179 180 40300 -1 1
How can I get rid of all those rows with nulls except for the goal, status and trend?