Search code examples
excelssasmdxolapolap-cube

How to view customer count by transaction count in OLAP using mdx or how to reverse view dimension and measures


I have a sales transaction fact table and customer dimension table. I have transaction-count as a measure.

I want my report as:

No. of Time Transaction doing   Customers    Transactions
1                                10                10
2                                6                 12
3-6                              5                 ??

How can i achieve this in OLAP using mdx or even using excel but mainitaining pivot table structure.


Solution

  • You may create measures like this:

    With
    Member [Measures].[Customers with 1 transaction] as
    Sum(
        existing [Customer].[Customer].[Customer].Members,
        IIF(
            [Measures].[TransactionCount] = 1,
            1,
            NULL
        )
    )