locked
Taking out values based percentage not overall RRS feed

  • Question

  • I am working on Generating reports from MDX queries, I have a problem that i can take out overall percentage distribution but i cannot take out value based distribution for e.g. if i write the query :

    with member  [Measures].[Percentage] as '[Measures].[Value]/ (Root([ATM_DETAILS]),[Measures].[Value])',format_string='0.00%;' select NON EMPTY [TRANSACTION_CODE].[MemberDescription].[MemberDescription] * [Measures].[Percentage] ON Rows, NON EMPTY [ATM_DETAILS].[MemberName].[MemberName] ON Columns FROM TxnCountAssociation


    the result is 

                                  0021    0051   0052   0061
    F Percentage         0.36% 0.13% 1.34% 1.90%
    NF Percentage       0.30% 0.11% 1.18% 1.74% 

    i have to write a query to show the percentage distribution of F/NF transaction on one terminal this query will give me percentage that on one terminal if the total number of transactions are considered 100%, 60% were F and 40% were NF. So the result of the query would be 

                                  0021    0051   0052
    F Percentage         60%     50%    25%
    NF Percentage       40%     50%    75%




    Thanks in Advance,

    Regards,
    Ahmed Saleem

    askasmani
    Thursday, January 15, 2009 6:55 AM

Answers

  • problem was  solved by the following query:

    with member [Measures].[Percentage] as '[Measures].[Value]/ (Root([TRANSACTION_CODE]),[Measures].[Value])',format_string='0.00%;'

    select NON EMPTY [TRANSACTION_CODE].[MemberDescription].[MemberDescription] * [Measures].[Percentage] ON Rows,

    NON EMPTY HIERARCHIZE( { [ATM_DETAILS].[MemberName].&[0021] } ) ON Columns

    FROM TxnCountAssociation


    askasmani
    • Marked as answer by askasmani Thursday, January 15, 2009 8:39 AM
    Thursday, January 15, 2009 7:35 AM