需要了解范围脚本 [英] Need to understand the scope script

查看:122
本文介绍了需要了解范围脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有范围脚本,有人可以解释我在做什么。

I have scope script and can someone explain me what it is doing.



SCOPE(

     [ - Scenario]。[Scenario]。& [FYF] 

     ;);   

THIS =(

      ANCESTOR(

      ;        [ - Time]。[Time Hierarchy] .CURRENTMEMBER

           ,[ - 时间]。[时间层次]。[年]

         )

     ,[ - Scenario]。[Scenario]。& [CYDF]

    ); 

END SCOPE; 


SCOPE (
        [- Scenario].[Scenario].&[FYF] 
      );   
THIS = (
          ANCESTOR(
                      [- Time].[Time Hierarchy].CURRENTMEMBER
                    , [- Time].[Time Hierarchy].[Year]
                  )
          , [- Scenario].[Scenario].&[CYDF]
        ); 
END SCOPE; 

推荐答案

您好Haf_Microsoft

Hi Haf_Microsoft

根据我的理解,范围用于重新定义度量或属性。

Based on my understand, scope is used for re-define measure or attribute.

在上面的查询中,它的逻辑 看起来当你使用[FYF]时,它会根据行轴显示[CYDF]的日期年值。

In your above query, its logic  looks like that when you use [FYF], it will show [CYDF]'s year value of date based on row axis.

我不确定你是否得到了正确的结果,我在我的环境中测试你的第一个表达式,它将获得null值。

And I am not sure whether you get the correct result, I test your first expression in my environment, it will get null value.

你可以参考  MDX Scripting - SCOPE  了解详情。

You could refer to MDX Scripting - SCOPE for details.


这篇关于需要了解范围脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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