简体   繁体   English

从 SSAS OLAP Cube (MDX) 获取数据时,为什么 Excel 总计返回错误 (#VALUE?)?

[英]Why does Excel Grand Total returns error (#VALUE!) when getting data from SSAS OLAP Cube (MDX)?

I am having a problem with Grand Total in Excel connected to a OLAP cube.我在连接到 OLAP 多维数据集的 Excel 中的总计有问题。 I have a measure that are correctly calculated in row level, but returns error in Grand Total.我有一个在行级别正确计算的度量,但在总计中返回错误。 Its returning me an error #VALUE.它返回给我一个错误#VALUE。 . .

EDIT: I have doing some experiences and verified that the error only appears when I have more then one year selected.编辑:我做了一些经验并验证了该错误仅在我选择了一年以上时才会出现。 If I have only one the data returns correct.如果我只有一个,则数据返回正确。

I try several alterations to the measure with no success.我尝试了几次对该措施的更改,但均未成功。

The origin measure:原产地测量:

IIF([Tipo de Stock].[Tipo de Stock].CurrentMember IS [Tipo de Stock].[Tipo de Stock].&[7] OR, NULL,
SUM({NULL:[Data].[Por Mês].PrevMember},[Measures].[Movimento Valor])
)

Some alterations trying to solve the problem:一些试图解决问题的改动:

IIF([Tipo de Stock].[Tipo de Stock].CurrentMember IS [Tipo de Stock].[Tipo de Stock].&[7] OR IsEmpty([Measures].[Movimento Valor]), NULL,
SUM({NULL:[Data].[Por Mês].PrevMember},[Measures].[Movimento Valor])
)

IIF([Tipo de Stock].[Tipo de Stock].CurrentMember IS [Tipo de Stock].[Tipo de Stock].&[7], NULL,
SUM({NULL:[Data].[Por Mês].PrevMember},IsEmpty([Measures].[Movimento Valor],0))
)

IIF([Tipo de Stock].[Tipo de Stock].CurrentMember IS [Tipo de Stock].[Tipo de Stock].&[7], NULL,
IsEmpty(SUM({NULL:[Data].[Por Mês].PrevMember},[Measures].[Movimento Valor]),0)
)

I have try also with CoalesceEmpty instead IsEmpty.我也尝试使用 CoalesceEmpty 而不是 IsEmpty。

Edit2:I try to implement a SCOPE and it returns values in Grand Total, but the Values are the SUM of all rows. Edit2:我尝试实现 SCOPE 并返回总计值,但值是所有行的总和。 The idea is that the grand total has the first value.这个想法是总计具有第一个值。

SCOPE([Measures].[Stock Inicial Valor]); 
    SCOPE([Data].[Por Mês].[Mês].members);  
        THIS = SUM({NULL:[Data].[Por Mês].PrevMember},[Measures].[Movimento Valor]); 
    END SCOPE;      
END SCOPE;

Any one can help get to the right track.任何人都可以帮助走上正轨。

Thanks for all your help.感谢你的帮助。

Please try the following:请尝试以下方法:


IIF(
  [Tipo de Stock].[Tipo de Stock].CurrentMember IS [Tipo de Stock].[Tipo de Stock].&[7] 
  OR [Data].[Por Mês].PrevMember IS NULL,
  NULL,
  SUM({NULL:[Data].[Por Mês].PrevMember},[Measures].[Movimento Valor])
)

I suspect the problem is that {Null:Null} isn't allowed so we are protecting against that in the new IIF statement.我怀疑问题是 {Null:Null} 是不允许的,所以我们在新的 IIF 声明中防止这种情况发生。

If that's not the problem then please install this free Excel extension and use this feature to get a proper error message to troubleshoot further.如果这不是问题,请安装此免费的 Excel 扩展并使用此功能获取正确的错误消息以进一步排除故障。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从 SSAS OLAP Cube (MDX) 获取数据时,如何在 Excel SubTotal 中获取第一行? - How to get first row in Excel SubTotal when getting data from SSAS OLAP Cube (MDX)? 在OLAP多维数据集错误Grand Total过滤属性时 - In OLAP cube wrong Grand Total when attribute is filtered Excel中OLAP SSAS多维数据集数据透视表的替代方法 - Alternatives to OLAP SSAS Cube Pivot Tables in Excel 按连接到SSAS OLAP多维数据集的Excel中的键排序 - Sort by key in Excel connected to SSAS OLAP cube SSAS总计总计错误,因为从计算所得成员获取价值 - SSAS Grand Total is wrong because get value from Calculated member 如何使用或筛选器从Excel中的OLAP多维数据集数据透视表获取数据 - How to use Or filters for getting data from OLAP cube pivot table in Excel SSAS总计总计在Excel中的计算量度不起作用 - SSAS Grand Total for calculated measure in excel not working Excel - 以单元格值作为参数对SSAS多维数据集进行MDX查询 - Excel - MDX query to SSAS Cube with cell values as parameters 通过Excel的OLAP多维数据集-传输层错误 - OLAP Cube Through Excel - Transport Layer Error SSAS-具有“不适用”成员的聚集问题,需要从Excel的“总计”中排除 - SSAS - Aggregation issue with “Not-applicable” members that needs to be excluded from the “Grand Total” in Excel
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM