开发者

How to create following cube?

开发者 https://www.devze.com 2022-12-24 13:35 出处:网络
For example........... Database Table: BatchIDBatchNameChemicalValue --------------------------------------------------------

For example...........

  • Database Table:

         BatchID    BatchName      Chemical      Value
    --------------------------------------------------------
         BI-1       BN-1           CH-1             1
         BI-2       BN-2           CH-2             2
    -------------------------------------------------------开发者_运维百科-
    

I need to display following cube

                  BI-1             BI-2
                  BN-1             BN-2
 -----------------------------------------
   CH-1           1                null
 ------------------------------------------
   CH-2           null             2
 ------------------------------------------

Here BI-1,BN-1 are two rows in a single columns i need to display chemical value as row of that.

What is query MDX query for this.

Could Please help me to solve this problem.

Thank You.


Create a cube with BatchID, Batchname and Chemical as dimensions and Value as measure.

Then use the following MDX code:

SELECT
  Crossjoin(Crossjoin([BatchID].Members, [Batchname].Members), { [Measures].[Value] }) ON COLUMNS,
  [Chemical].Members ON ROWS
  FROM [Mycube]
0

精彩评论

暂无评论...
验证码 换一张
取 消