Quantcast
Channel: SQL Server Analysis Services Forum
Viewing all articles
Browse latest Browse all 2472

How to eliminate Sub-query "side effect" in Pivot table

$
0
0
 

Hi All,

I found that my Excel 2007 Pivot table report generates sub-query with double From statement.

If I use a filter on the Budget Item (Budget Item is a set/group of Projects), it impacts my initial Scope below (this statement should evaluate all Projects, not only filtered by Pivot table's sub-query):

"

SCOPE (DESCENDANTS([Project].[by Type].[Project Type].&[ABSENT]));

[Measures].[Absent Hours] = [Measures].[Hours];

END SCOPE;

"

It looks that Pivot table MDX query loses All projects in the Scope, which I use for my calculations algorythm later in the Cube's Calculations area. My cube culculation goes down from All Projects level to 1 project, but I need All Projects at the beginning to evaluate Absent Hours impact to every Project.

Does anyone know what to place in that scope or the MDX script globally, ignoring Pivot table's subquery filter, which screw up Project selection filtered by Budget Item? I need to have ABSENT for All Projects (All Budget Items) by default, not for filtered set of Budget Items (Projects)?

I am experimenting with this IIF statement below, trying to get all Projects list back for my calculations, but no luck. How to call all Projects back?:

[Measures].[Absent Hours] = IIF(Ancestor([Project].[by Type].[Project Name].CurrentMember,[Project].[by Type].[Project Type]) = "ABSENT",[Measures].[Hours],Null);

Thanks, Tomas



Viewing all articles
Browse latest Browse all 2472

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>