2012-10-29 72 views
0

我是MDX和分析服務的新手,因此深受我的歡迎。當我運行以下MDX查詢時,結果值將作爲列A-I的雙精度返回,但列元數據顯示數據類型爲應該爲double時的類型對象的類型。我如何強制它將數據類型識別爲雙倍,我可以這樣做嗎?我不知道它是如何推斷它是類型對象。如何在MDX中將列定義爲double的數據類型?

WITH 
     MEMBER [Column (A)] AS [Measures].[ColumnA] 
     MEMBER [Column (B)] AS [Measures].[ColumnB] 
     MEMBER [Column (C)] AS [Measures].[ColumnC] 
     MEMBER [Column (D)] AS [Measures].[ColumnD] 
     MEMBER [Column (E)] AS [Measures].[ColumnE] 
     MEMBER [Column (F)] AS [Measures].[ColumnF] 
     MEMBER [Column (G)] AS [Measures].[ColumnB] - [Measures].[ColumnA] 
     MEMBER [Column (H)] AS [Measures].[ColumnD] - [Measures].[ColumnC] 
     MEMBER [Column (I)] AS [Measures].[ColumnF] - [Measures].[ColumnE] 
     SELECT 
     NON EMPTY 
     { 
      Column (A), 
      Column (B), 
      Column (C), 
      Column (D), 
      Column (E), 
      Column (F), 
      Column (G), 
      Column (H), 
      Column (I) 
     } ON COLUMNS, 
     NON EMPTY 
     CROSSJOIN(
      CROSSJOIN([T].[TB].[TB], 

        [T].[TT].[TT]), 

        [T].[TR].[TR]) 
     ON ROWS 
     FROM RePro   
     WHERE 
     (
      [RS].[RS].[EOD], 
       [RD].[RD].[DATE], 
       [P].[P].[ABCD] 
     ) 
     CELL PROPERTIES VALUE 

在此先感謝

回答

0

我可以在這裏失去了一些背景,但他們自己定義爲[Measures].[ColumnA]decimal(或money)?

如果是這樣,你能不能嘗試在MDX這個細微的變化,其中,代替

WITH MEMBER [Column (A)] ... 

它改成

WITH MEMBER [Measures].[Column (A)] AS [Measures].[ColumnA] 

所以這樣的數據類型定義完全傳播爲你」保持相同的度量上下文。

相關問題