0

我正在一个 OLAP 多维数据集上构建一个 SSRS 报告,该多维数据集按货币分解数据。货币进入列。不同之处在于用户只想查看几种主要货币(如美元、欧元、日元),并将其他所有货币组合到“其他”列中。

实际上,我需要将整个货币世界分解为美元、欧元、日元和其他货币。实现它的最佳方法是什么?我觉得这应该是可行的,但我找不到谷歌搜索的正确关键字。

4

1 回答 1

2

假设您有一个可以安全地组合到“其他”组中的度量,您可以通过创建一组“主要”成员和一个新的“其他”成员来组合多个成员,该成员是具有“主要”的所有成员的聚合“那些被删除了。

这是一个针对 Adventure Works 的示例:

WITH 
    SET [Major] AS {
        [Source Currency].[Source Currency Code].&[100], 
        [Source Currency].[Source Currency Code].&[19],
        [Source Currency].[Source Currency Code].&[98]
        }
    MEMBER [Source Currency].[Source Currency Code].[Other] AS 
        Aggregate(Except([Source Currency].[Source Currency Code].[Source Currency Code], [Major]))
SELECT
    {[Major], [Other]} ON 0,
    [Customer].[Customer Geography].[Country] ON 1
FROM [Adventure Works]
WHERE [Measures].[Internet Sales Amount]

结果:

                          USD            CAD            GBP          Other
Australia           $9,012.50         (null)         (null)  $9,051,988.08 
Canada            $172,181.96  $1,805,662.90         (null)         (null)
France          $2,462,361.69         (null)      $1,084.33    $180,571.69 
Germany         $2,656,527.35         (null)         (null)    $237,784.99 
United Kingdom      $4,446.85         (null)  $3,387,265.36         (null)
United States   $9,388,934.97        $854.54         (null)         (null)
于 2013-03-20T00:54:51.203 回答