简体   繁体   中英

Calculated measure MDX through Pivot Table Excel

I am connected to OLAP cube, I created a pivottable.

I would like to know if with the OLAP tool of excel is possible to calculate the number of distinct invoice number taking acount the current filters like year, country and region of the pivot table ?

I tried with Countdistinct it gives me the same result for each country. DistinctCount([PO TYPE].[PO NUMBER].[PO NUMBER])

Try using COUNT instead:

Count(
   Exists(
     [PO TYPE].[PO NUMBER].[PO NUMBER].MEMBERS,
     [Geography].[Country].CURRENTMEMBER,
     "MeasureGroupName"
   )
 )

You need to replace "MeasureGroupName" with a measure group name in your cube

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