MDX -> Query works in CubeBrowser not PowerPivot -> “unable to cast object of type 'system.dbnull' to type 'system.string'”

StackOverflow https://stackoverflow.com/questions/9026512

  •  14-11-2019
  •  | 
  •  

Pergunta

Pasting query into powerpivot produces the following error but works in CubeBrowser. : "unable to cast object of type 'system.dbnull' to type 'system.string'"

Here is my query.

SELECT NON EMPTY { [Measures].[Revenue],  [Measures].[PrevDayRevenue], [Measures].[RANKRevenuePrevOrder], [Measures].[RANKRevenueCurrOrder] } ON COLUMNS,

NON EMPTY { ( [RevRankCurrOrder] ) } ON ROWS 

FROM [DW] 

WHERE {[Date Link].[PK Date].&[2012-01-10T00:00:00]}

I am just wondering if anyone has seen this issue before. I know that issues occur when pasting an MDX query into Excel and SSRS, but need to know if there is any way to fix this, etc.

Any help direction will be greatly appreciated.

Thanks.

Foi útil?

Solução

I ended up fixing this by doing a calculated member that does a null check for my revenue. (using iif isEmpty)

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top