Quantcast
Channel: SQL Server Analysis Services Forum
Viewing all articles
Browse latest Browse all 2472

URGENT: MDX : Unique Cards falling in to Band's based on there repetation over the month

$
0
0

Hi everyone i am in problem for writing a mdx query

In this scenario, i am having two Dimension

DimTxnTime (TimeKey, TxnYear, TxnMonth, TxnQrtr, ... etc)  and
DimCard(CardID, CardNumber, CardHolderName, CardExpiryDt, Address, ... etc)

and one Fact Table

FactTxn(TimeKey, CardID, TxnAmount, TxnTax, ... etc)

now as per the business logic, there are 3 logical Bands as per the unique card's Repetitive purchase within month.

Band 1: a Unique card Used once in a month

Band 2: Card Used Twice in a month

Band 3: Card Used Thrice or more in a month

now in mdx how can i count distinct card's repetition and arrange them in particular Band over the month

Output could look like:

 

           Band 1         Band 2       Band 3
            --------        ----------    -----------
Jan       23               10              60
Feb      5                 25              9
March  7                 8               12
.          ..               ... .            ...
.          ..               ... .            ...
Dec      20               8             11

please let me know if more clarification needed help on urgent basis.



Regards, Shanu





Viewing all articles
Browse latest Browse all 2472

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>