We can get a Pivot Table to send two different MDX queries to SSAS that are supposed to return the same results. The first query has never successfully returned data, as it continues to run until we manually stop it. The second returns
the results after a few seconds. The first query was sent to SSAS after using the context menu Filter -> "Keep only selected items" on the top level item (Customer1) and then trying to expand it. After canceling the query the second query
was sent after moving the position of [Shipment].[Shipment #] in the PivotTable Fields ROWS section from the bottom of the list to the top and then back to the bottom. We can then expand and collapse the top level item at will, with no wait. Also,
this is only an issue when we are using a Calculated Measure. Any idea why a PivotTable generates the first query? Or how can we configure it not to?
We used Profiler to obtain the queries.
First Query: doesn't work
SELECT {[Measures].[Performance Issue Count], [Measures].[Shipment Count], [Measures].[Shipment Carrier Had Issue], [Measures].[Shipment Failure Rate]} DIMENSION PROPERTIES PARENT_UNIQUE_NAME, HIERARCHY_UNIQUE_NAME ON COLUMNS, NON EMPTY Hierarchize( DrilldownMember( DrilldownMember( DrilldownMember( CrossJoin( {[Customer Ship To].[Parent].[All],[Customer Ship To].[Parent].[Parent].AllMembers}, {([Shipment Origin].[City].[All],[Shipment Carrier].[Carrier].[All],[Shipment].[Shipment #].[All])} ), {[Customer Ship To].[Parent].&[Customer1]}, [Shipment Origin].[City] ), [Shipment Origin].[City].[City].AllMembers, [Shipment Carrier].[Carrier] ), [Shipment Carrier].[Carrier].[Carrier].AllMembers, [Shipment].[Shipment #] ) ) DIMENSION PROPERTIES PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME, [Shipment Origin].[City].[City].[Region], [Shipment].[Shipment #].[Shipment #].[Actual Ship Date] ON ROWS FROM (SELECT ({[Customer Ship To].[Parent].&[Customer1]}) ON COLUMNS FROM [Shipments Cube]) CELL PROPERTIES VALUE, FORMAT_STRING, LANGUAGE, BACK_COLOR, FORE_COLOR, FONT_FLAGS
Second Query: works
SELECT { [Measures].[Performance Issue Count], [Measures].[Shipment Count], [Measures].[Shipment Carrier Had Issue], [Measures].[Shipment Failure Rate] } DIMENSION PROPERTIES PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME ON COLUMNS , NON EMPTY CrossJoin( CrossJoin( CrossJoin( Hierarchize({DrilldownLevel({[Customer Ship To].[Parent].[All]},,,INCLUDE_CALC_MEMBERS)} ), Hierarchize({DrilldownLevel({[Shipment Origin].[City].[All]},,,INCLUDE_CALC_MEMBERS)}) ), Hierarchize({DrilldownLevel({[Shipment Carrier].[Carrier].[All]},,,INCLUDE_CALC_MEMBERS)}) ), Hierarchize({DrilldownLevel({[Shipment].[Shipment #].[All]},,,INCLUDE_CALC_MEMBERS)}) ) DIMENSION PROPERTIES PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME, [Shipment Origin].[City].[City].[Region], [Shipment].[Shipment #].[Shipment #].[Actual Ship Date] ON ROWS FROM (SELECT ({[Customer Ship To].[Parent].&[Customer1]}) ON COLUMNS FROM [Shipments Cube]) CELL PROPERTIES VALUE, FORMAT_STRING, LANGUAGE, BACK_COLOR, FORE_COLOR, FONT_FLAGS
Thanks.