Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
410
Need to show Top 10 results
posted

I need to show Top 10 results for a particular column.

Lets say need to display only top 10 customers having maximum internet sales for a product. How can I achieve such functionality using xamPivotGrid. I understand that I might have to change MDX query that is run. (Or is there another way to do this?)

Parents Reply
  • 8831
    posted in reply to Sam A.

    Hello,

    You may need something like the query described in this post.

     

    Currently we don’t support that functionality. However you can get access to the Execute statement passed to the XMLA service:

     

    With the latest service release we provide XmlaDataSource.InitXmlaMethod event. When you are listening for this event you are able to:

    1.       Track all Discover queries passed against XMLA service – it means that in the event handler you have access to properties and restrictions included into the SOAP body when Discover is posted.

    2.       Track all Execute queries – you have access to the statement which we generate and execute against XMLA service.

     

    Have a look at this sample:

     

            private void XmlaDataSource_InitXmlaMethod(object sender, InitXmlaMethodEventArgs e)

            {

                XmlaSoapMethodExecute executeMethod = e.SoapMethod as XmlaSoapMethodExecute;

                if (executeMethod != null)

                {

                    string statement = executeMethod.Statement;

                }

            }

     

    The statement can be modified and the modified version is the one that we will pass to XMLA service. Hopefully we can process properly the result returned in response of the modified statement.

     

    Best regards.

    Plamen.

Children