具有 DAX 和多个事实表的 SSRS 数据集

SSRS dataset with DAX and multiple fact tables

我想创建一个连接到 SSAS 表格数据库的 SSRS 报告。此 SSRS 报告应包含一个矩阵,其中包含按年份和成本类型分组的成本和预算成本。

现在我的问题是,成本 table 和预算成本 table 都是事实 table。我不知道足够多的 DAX 来从两个事实 table 中获取列。现在我只能创建一个包含成本或预算成本的数据集。 我考虑了两个矩阵中的两个数据集。但这显然不是一个好的解决方案。

这是我的(不工作的)DAX 代码的示例。

EVALUATE
 (
    FILTER (
        SUMMARIZE (
            Costs,
            Costs[IScost],
            Time[year],
            CostType[name],
            PlanedCosts[ISplanedcost]
        ),
        Time[year] = 2018
    )
)

我不认为这是一项艰巨的任务,但到目前为止,我还没有找到使用 DAX 和 SSRS 的解决方案。我不敢相信这对于 DAX 是不可能的。还是我真的需要使用,例如,MDX 查询? 如果有人能指导我正确的方向,我将不胜感激。

所以这是一个基于 Adventure Works 的示例。它具有 MDX 查询,可以准确查询您想要实现的目标。只需替换 Measures 和 Dimensions 就可以了

Select 
non empty //Non empty eliminates the null combinations
(
[Date].[Calendar Year].[Calendar Year], // Place your Date dimension here 
{[Measures].[Internet Sales Amount],[Measures].[Internet Order Quantity]} //These will be the two measures cost & budget. 
)
on columns,
non empty //Non empty eliminates the null combinations
[Product].[Subcategory].[Subcategory] //Place your cost type dimension here 
on rows 
from [Adventure Works]