mcornell13
New Member
- Joined
- Nov 1, 2013
- Messages
- 1
<!--[if !supportLists]-->Hi guys -<o
></o
>
In testing a Tabular(2012 SP1) model I've been working on, I'm noticing that when invoking thedrillthrough action in Excel (2010), it does not appear to be functioningas I expect when the Calculated Measure includes a CALCULATE expression with additionalfilter context applied. The value being displayed in the Pivot Table iscorrect, but when I drill through a cell, ALL values are being returned forthe original expression within the CALCULATE expression for the filter contextof the Pivot Table only. It's like any additional filter context used inthe Calculated Measure AFTER the CALCULATE expression is being ignored by the drill through.<o
></o
>
Here's a simpleexample I created in PowerPivot to illustrate my problem:<o
></o
>
I have a simple Orderstable:<o
></o
>
[TABLE="class: MsoNormalTable, width: 210"]
<tbody>[TR]
[TD="width: 81"]Salesman<o
></o
>
[/TD]
[TD="width: 109"]OrderNumber<o
></o
>
[/TD]
[TD="width: 89"]Year<o
></o
>
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Mike<o
></o
>
[/TD]
[TD="bgcolor: transparent"]
[/TD]
[TD="bgcolor: transparent"]
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Mike<o
></o
>
[/TD]
[TD="bgcolor: transparent"]
[/TD]
[TD="bgcolor: transparent"]
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Mike<o
></o
>
[/TD]
[TD="bgcolor: transparent"]
[/TD]
[TD="bgcolor: transparent"]
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Bob<o
></o
>
[/TD]
[TD="bgcolor: transparent"]
[/TD]
[TD="bgcolor: transparent"]
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Bob<o
></o
>
[/TD]
[TD="bgcolor: transparent"]
[/TD]
[TD="bgcolor: transparent"]
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Tom<o
></o
>
[/TD]
[TD="bgcolor: transparent"]
[/TD]
[TD="bgcolor: transparent"]
[/TD]
[/TR]
</tbody>[/TABLE]
I've created 2 simpleMeasures:<o
></o
>
CountOrders:=COUNTROWS(Orders)<o
></o
>
CountMikesOrders:=CALCULATE(Orders[CountOrders],Orders[Salesman]="Mike")<o
></o
>
Next, I created thesimple pivot table below:<o
></o
>
[TABLE="class: MsoNormalTable, width: 229"]
<tbody>[TR]
[TD="width: 92"]Row Labels<o
></o
>
[/TD]
[TD="width: 87"]CountOrders<o
></o
>
[/TD]
[TD="width: 127"]CountMikesOrders<o
></o
>
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]2012<o
></o
>
[/TD]
[TD="bgcolor: transparent"]
[/TD]
[TD="bgcolor: transparent"]
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]2013<o
></o
>
[/TD]
[TD="bgcolor: transparent"]
[/TD]
[TD="bgcolor: transparent"]
[/TD]
[/TR]
[TR]
[TD]Grand Total<o
></o
>
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[/TR]
</tbody>[/TABLE]
As you see, the valuescalculate as expected.<o
></o
>
Next, I'll drillthrough CountOrders (does not include additional filter context inmeasure) for the 2012 row (expect 4 rows):<o
></o
>
-----------------------<o
></o
>
[TABLE="class: MsoNormalTable, width: 352"]
<tbody>[TR]
[TD="width: 344, bgcolor: transparent, colspan: 2"]Data returned for CountOrders, 2012 (First 1000 rows).<o
></o
>
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD][$Orders].[Salesman]<o
></o
>
[/TD]
[TD][$Orders].[OrderNumber]<o
></o
>
[/TD]
[TD][$Orders].[Year]<o
></o
>
[/TD]
[/TR]
[TR]
[TD]Mike<o
></o
>
[/TD]
[TD]3<o
></o
>
[/TD]
[TD]2012<o
></o
>
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Mike<o
></o
>
[/TD]
[TD="bgcolor: transparent"]2<o
></o
>
[/TD]
[TD="bgcolor: transparent"]2012<o
></o
>
[/TD]
[/TR]
[TR]
[TD]Bob<o
></o
>
[/TD]
[TD]1<o
></o
>
[/TD]
[TD]2012<o
></o
>
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Tom<o
></o
>
[/TD]
[TD="bgcolor: transparent"]19<o
></o
>
[/TD]
[TD="bgcolor: transparent"]2012<o
></o
>
[/TD]
[/TR]
</tbody>[/TABLE]
----------------------<o
></o
>
The returned valuesare as expected.<o
></o
>
Next, I'll drillthrough CountMikeOrders (does include additional filter context in measure) forthe same 2012 row (expect 2 rows):<o
></o
>
------------------<o
></o
>
[TABLE="class: MsoNormalTable, width: 352"]
<tbody>[TR]
[TD="width: 469, bgcolor: transparent, colspan: 3"]Data returned for CountMikesOrders, 2012 (First 1000 rows).<o
></o
>
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD][$Orders].[Salesman]<o
></o
>
[/TD]
[TD][$Orders].[OrderNumber]<o
></o
>
[/TD]
[TD][$Orders].[Year]<o
></o
>
[/TD]
[/TR]
[TR]
[TD]Mike<o
></o
>
[/TD]
[TD]3<o
></o
>
[/TD]
[TD]2012<o
></o
>
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Mike<o
></o
>
[/TD]
[TD="bgcolor: transparent"]2<o
></o
>
[/TD]
[TD="bgcolor: transparent"]2012<o
></o
>
[/TD]
[/TR]
[TR]
[TD]Bob<o
></o
>
[/TD]
[TD]1<o
></o
>
[/TD]
[TD]2012<o
></o
>
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Tom<o
></o
>
[/TD]
[TD="bgcolor: transparent"]19<o
></o
>
[/TD]
[TD="bgcolor: transparent"]2012<o
></o
>
[/TD]
[/TR]
</tbody>[/TABLE]
----------------------<o
></o
>
As you see, ALL rowsfor 2012 were returned, not just the rows for "Mike".<o
></o
>
To me, this seemsincorrect. I'm also sure it will seem incorrect to my users, as they willexpect only the rows to be returned for the value they drilled through.<o
></o
>
Am I missing some very obvious rule about filter context?
Is this functionalityexpected? Is there a way (either setting or DAX code) to get the appropriatedrillthrough records returned when applying additional filter context within a measure?<o
></o
>
I appreciate any andall responses.<o
></o
>
Thanks - Mike<o
></o
>


In testing a Tabular(2012 SP1) model I've been working on, I'm noticing that when invoking thedrillthrough action in Excel (2010), it does not appear to be functioningas I expect when the Calculated Measure includes a CALCULATE expression with additionalfilter context applied. The value being displayed in the Pivot Table iscorrect, but when I drill through a cell, ALL values are being returned forthe original expression within the CALCULATE expression for the filter contextof the Pivot Table only. It's like any additional filter context used inthe Calculated Measure AFTER the CALCULATE expression is being ignored by the drill through.<o


Here's a simpleexample I created in PowerPivot to illustrate my problem:<o


I have a simple Orderstable:<o


[TABLE="class: MsoNormalTable, width: 210"]
<tbody>[TR]
[TD="width: 81"]Salesman<o


[/TD]
[TD="width: 109"]OrderNumber<o


[/TD]
[TD="width: 89"]Year<o


[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Mike<o


[/TD]
[TD="bgcolor: transparent"]
3<o
></o
>


[TD="bgcolor: transparent"]
2012<o
></o
>


[/TR]
[TR]
[TD="bgcolor: transparent"]Mike<o


[/TD]
[TD="bgcolor: transparent"]
2<o
></o
>


[TD="bgcolor: transparent"]
2012<o
></o
>


[/TR]
[TR]
[TD="bgcolor: transparent"]Mike<o


[/TD]
[TD="bgcolor: transparent"]
32<o
></o
>


[TD="bgcolor: transparent"]
2013<o
></o
>


[/TR]
[TR]
[TD="bgcolor: transparent"]Bob<o


[/TD]
[TD="bgcolor: transparent"]
1<o
></o
>


[TD="bgcolor: transparent"]
2012<o
></o
>


[/TR]
[TR]
[TD="bgcolor: transparent"]Bob<o


[/TD]
[TD="bgcolor: transparent"]
6<o
></o
>


[TD="bgcolor: transparent"]
2013<o
></o
>


[/TR]
[TR]
[TD="bgcolor: transparent"]Tom<o


[/TD]
[TD="bgcolor: transparent"]
19<o
></o
>


[TD="bgcolor: transparent"]
2012<o
></o
>


[/TR]
</tbody>[/TABLE]
I've created 2 simpleMeasures:<o


CountOrders:=COUNTROWS(Orders)<o


CountMikesOrders:=CALCULATE(Orders[CountOrders],Orders[Salesman]="Mike")<o


Next, I created thesimple pivot table below:<o


[TABLE="class: MsoNormalTable, width: 229"]
<tbody>[TR]
[TD="width: 92"]Row Labels<o


[/TD]
[TD="width: 87"]CountOrders<o


[/TD]
[TD="width: 127"]CountMikesOrders<o


[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]2012<o


[/TD]
[TD="bgcolor: transparent"]
4<o
></o
>


[TD="bgcolor: transparent"]
2<o
></o
>


[/TR]
[TR]
[TD="bgcolor: transparent"]2013<o


[/TD]
[TD="bgcolor: transparent"]
2<o
></o
>


[TD="bgcolor: transparent"]
1<o
></o
>


[/TR]
[TR]
[TD]Grand Total<o


[/TD]
[TD]
6<o
></o
>


[TD]
3<o
></o
>


[/TR]
</tbody>[/TABLE]
As you see, the valuescalculate as expected.<o


Next, I'll drillthrough CountOrders (does not include additional filter context inmeasure) for the 2012 row (expect 4 rows):<o


-----------------------<o


[TABLE="class: MsoNormalTable, width: 352"]
<tbody>[TR]
[TD="width: 344, bgcolor: transparent, colspan: 2"]Data returned for CountOrders, 2012 (First 1000 rows).<o


[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD][$Orders].[Salesman]<o


[/TD]
[TD][$Orders].[OrderNumber]<o


[/TD]
[TD][$Orders].[Year]<o


[/TD]
[/TR]
[TR]
[TD]Mike<o


[/TD]
[TD]3<o


[/TD]
[TD]2012<o


[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Mike<o


[/TD]
[TD="bgcolor: transparent"]2<o


[/TD]
[TD="bgcolor: transparent"]2012<o


[/TD]
[/TR]
[TR]
[TD]Bob<o


[/TD]
[TD]1<o


[/TD]
[TD]2012<o


[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Tom<o


[/TD]
[TD="bgcolor: transparent"]19<o


[/TD]
[TD="bgcolor: transparent"]2012<o


[/TD]
[/TR]
</tbody>[/TABLE]
----------------------<o


The returned valuesare as expected.<o


Next, I'll drillthrough CountMikeOrders (does include additional filter context in measure) forthe same 2012 row (expect 2 rows):<o


------------------<o


[TABLE="class: MsoNormalTable, width: 352"]
<tbody>[TR]
[TD="width: 469, bgcolor: transparent, colspan: 3"]Data returned for CountMikesOrders, 2012 (First 1000 rows).<o


[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD][$Orders].[Salesman]<o


[/TD]
[TD][$Orders].[OrderNumber]<o


[/TD]
[TD][$Orders].[Year]<o


[/TD]
[/TR]
[TR]
[TD]Mike<o


[/TD]
[TD]3<o


[/TD]
[TD]2012<o


[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Mike<o


[/TD]
[TD="bgcolor: transparent"]2<o


[/TD]
[TD="bgcolor: transparent"]2012<o


[/TD]
[/TR]
[TR]
[TD]Bob<o


[/TD]
[TD]1<o


[/TD]
[TD]2012<o


[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Tom<o


[/TD]
[TD="bgcolor: transparent"]19<o


[/TD]
[TD="bgcolor: transparent"]2012<o


[/TD]
[/TR]
</tbody>[/TABLE]
----------------------<o


As you see, ALL rowsfor 2012 were returned, not just the rows for "Mike".<o


To me, this seemsincorrect. I'm also sure it will seem incorrect to my users, as they willexpect only the rows to be returned for the value they drilled through.<o


Am I missing some very obvious rule about filter context?



I appreciate any andall responses.<o


Thanks - Mike<o

