在MDX中过滤条件

时间:2015-12-08 11:30:45

标签: filter mdx

你能帮我解决MDX问题吗?我需要选择用户计数的度量

SELECT 
  NON EMPTY 
    {
      [Measures].[User count]
     ,[Measures].[User count oM]
     ,[Measures].[User count oQ]
     ,[Measures].[User count oY]
    } ON COLUMNS
FROM [User count]
WHERE 
  (
    [Subscription tier].[Subscription tier].&[1]
   ,StrToMember("[Fordate].[YQMD].[Date].[" + Format(Now() - 1,"yyyy-MM-dd") + "]")
   ,{
      [Product].[Finance Group].&[3]
     ,[Product].[Finance Group].&[6]
     ,[Product].[Finance Group].&[8]
     ,[Product].[Finance Group].&[2]
     ,[Product].[Finance Group].&[9]
     ,[Product].[Finance Group].&[1]
    }
  );

这很有效。 我需要添加到这个工作MDX也像这样:

if [Product].[Finance Group].&[1] then filter
[Version].[Version subgroup].&[AVG 2012] 
+[Version].[Version subgroup].&[AVG 2013] 
+[Version].[Version subgroup].&[AVG 2014] 
+[Version].[Version subgroup].&[AVG 2015]
+[Version].[Version subgroup].&[AVG 2016]
+[Version].[Version subgroup].&[AVG 7-10]

1 个答案:

答案 0 :(得分:0)

我刚刚找到答案。也许它会帮助别人: - )

map.addListener('init', function () {
      function toggleMapObjectAlpha(e) {
        var alpha = e.type=="rollOverMapObject"?.3:.8;
        e.event.target.setAttribute("fill-opacity",alpha);
      }
      map.addListener('rollOverMapObject',toggleMapObjectAlpha);
      map.addListener('rollOutMapObject',toggleMapObjectAlpha);
    });