简体   繁体   中英

Excel Olap Pivot Table - Create calculated measure in MDX that shows difference to first filtered member taking into account current filters

I have built a PivotTable in Excel365 which is based on an OLAP Cube. In the Pivot Table, I filter the customers for which I want to show the price for the filtered products. The price is a measure created in the original OLAP Cube [msrPrice].

In the Excel Pivot Table, I'd like to show the price difference for each product from each of the filtered customers compared to the first filtered customer (in the screenshot marked in green).

I usually don't use MDX but have to use it in this case since the pivot table is based on an OLAP cube (and the usual calculated fields & items don't appear to work on pivot tables based on OLAP cubes).

I'd very much appreciate your help in guiding me on my Odyssee to the right MDX statement. Thanks! 在此处输入图片说明

Take a look at the example below

with member  
measures.t
as 
([Measures].[Internet Sales Amount]
/AXIS(0).item(0))*100

select 
{
([Customer].[Education].[Education],{[Measures].[Internet Sales Amount],measures.t})
}
on columns,
{
[Customer].[Country].[Country]
}
on rows 
from [Adventure Works]

Result

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM