Hi,
I had a report in SSRS that was working just fine in SQL 2012. I upgraded to SP1 and my client informed me the report was broken.
When I looked into it I found that I was getting an error because I was sorting on a calcuated member that was returning an error.
Here is my original query:
WITH
MEMBER [Measures].[ParameterCaption] AS
'(' +
ANCESTOR([Calendar].[FiscalYear].CURRENTMEMBER,2).NAME +') '+ [Calendar].[FiscalYear].CURRENTMEMBER.NAME --the desired result would be something like: (2013) 01-Jan
MEMBER [Measures].[ParameterValue] AS '[Calendar].[FiscalYear].CURRENTMEMBER.UNIQUENAME'
MEMBER [Measures].[ParameterLevel] AS '[Calendar].[FiscalYear].CURRENTMEMBER.LEVEL.ORDINAL'
SELECT {
[Measures].[ParameterCaption],
[Measures].[ParameterValue],
[Measures].[ParameterLevel]
} ON COLUMNS ,
ORDER (
filter(
[Calendar].[FiscalYear].[Fiscal Month Name].ALLMEMBERS,
not isempty([Measures].[Tran Count])
)
,Measures.ParameterCaption, BDESC)
ON ROWS
from [Sales Cube]
Again, this USED to work just fine, the only thing that has changed is applying SP1.
Now, after playing around with it a bit, I have found that if I change the ORDER function to sort by ParameterValue the query actually returns rows, however, the ParameterCaption column shows #Error. The error is 'type mismatch'.
When I remove the ORDER and FILTER functions the concatenation works just fine:
WITH
MEMBER [Measures].[ParameterCaption] AS
'(' +
ANCESTOR([Calendar].[FiscalYear].CURRENTMEMBER,2).NAME +') '+ [Calendar].[FiscalYear].CURRENTMEMBER.NAME
MEMBER [Measures].[ParameterValue] AS '[Calendar].[FiscalYear].CURRENTMEMBER.UNIQUENAME'
MEMBER [Measures].[ParameterLevel] AS '[Calendar].[FiscalYear].CURRENTMEMBER.LEVEL.ORDINAL'
SELECT {
[Measures].[ParameterCaption],
[Measures].[ParameterValue],
[Measures].[ParameterLevel]
} ON COLUMNS ,
[Calendar].[FiscalYear].[Fiscal Month Name].ALLMEMBERS
ON ROWS
from [Sales Cube]Am I the only one having this issue? I've searched the forumns and can't seem to find a resolution.
Thanks all!
JC