Quantcast
Channel: SQL Server Analysis Services forum
Viewing all articles
Browse latest Browse all 14337

MDX query - calculated member causing huge performance decrease

$
0
0

Hi all,

I have a query that works very well, until I add the calculated member.

WITH MEMBER [Measures].[Bonus quarter] AS
RIGHT([Date invoice].[Bonus calendar - Quarter].Currentmember.Name,1)


SELECT
{
	 [Measures].[QTD Invoices]
	,[Measures].[Ranking quarterly]
	,[Measures].[Total sales this year]
	,[Measures].[Total sales previous year]
	,[Measures].[YTD unpaids]
	,[Measures].[YTD unpaids special]
	,[Measures].[Evolution percentage]
	,[Measures].[Bonus quarter]
}

ON COLUMNS, NON EMPTY

Filter(
NonEmpty(
[Point of sale].[Client id].[Client id]
*[Point of sale].[POS name].[POS name]
*[Ranking details].[Start date].[Start date]
*[Ranking details].[End date].[End date]
*[Ranking details].[Flag start too late].[Flag start too late]
*[Ranking details].[Flag stopped too early].[Flag stopped too early]
*[Ranking details].[Rupture quarter].[Rupture quarter]
*[Date invoice].[Bonus calendar - Quarter].[Bonus quarter]
,[Measures].[Ranking quarterly]
)
,[Measures].[Ranking quarterly] <= 0
)
ON ROWS

FROM
	[RETAIL cube]
WHERE
{
	[Date invoice].[Bonus calendar - Week].[Bonus week of year].&[2016]&[26]
}

The reason for me is simple. The calculated member does not take into account the non-empty and filters on the rows. Because of this, the output contains all the rows with (null) for all measures, except for my calculation. Is there anyway I can force my calculated measure to use the non empty set?


Thanks!



Viewing all articles
Browse latest Browse all 14337

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>