SSAS MD MDX以月为单位进行计算,其他结果为总和 [英] SSAS MD MDX calculate in month level and others sum result

查看:151
本文介绍了SSAS MD MDX以月为单位进行计算,其他结果为总和的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要解决此问题。 我需要在月份级别计算一些公式,但是使用季度和年份我需要将月份结果中的值相加。 如果需要,用户只能选择几个月。

I need to resolve this issue.  I need to calculate some formula in month level but with Quarter and Year i need to sum the value from the month results.  The user can select only few month if need it .

我有这个计算成员

但是如果用户只选择两个月,这不起作用。我需要计算它是否是月份级别的公式,如果其他级别只计算用户选择的月份的结果。

But this doesnt work if the user select two month only. i need to calculate if it's month level the formula and if other level sum the results of only the month that the user select.

任何帮助它都非常有用

Juan 

Juan 

Juan Alvarado - MVP SQL SERVER

Juan Alvarado - MVP SQL SERVER

推荐答案

嗨  Juan M.Alvarado,

Hi  Juan M.Alvarado,

您可以尝试使用以下查询来查看它是否有效

You could try to use below query to see whether it will work or not

CASE WHEN [Date].[Calendar Date].Currentmember.Level.Ordinal = 3 THEN
 [Measures].[Internet Sales Count]/1000
ELSE
SUM(exists( [Measures].[Internet Sales Count]))
END

您需要在Excel中使用切片器

You need to use Slicer in Excel


这篇关于SSAS MD MDX以月为单位进行计算,其他结果为总和的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆