web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

SSAS Cube SSRS Report lookup with MDX query

(0) ShareShare
ReportReport
Posted on by 1,673

Hi everyone

I've written an SSRS report that runs off the SalesCube SSAS cube. I'm struggling to get the parameter lookups to display the correct data.

I'd like to filter on SalesDistrict and Classification (amongst others), but SalesDistrict and Classification are returning blank and duplicate values (Sales District and Classification are both dimensions in this cube). What is the best way to create a simple listed parameter lookup of values for SalesDistrict and Classification so that I can use to filter on? I'm completely new to MDX. I suppose the question could also be asked, 'How do I create a simple list based on a dimension'? This is what I've tried so far, but none of it works. It either returns blank values, or duplicate values, or no values etc.

(btw. For each parameter, I've created a datasource. This is the script for the datasource for classification)

SELECT NON EMPTY  { [Measures].[SomeMeasure] } ON COLUMNS, NON EMPTY { ([Customer].[Customer classification].[Customer classification].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM [Sales cube]

I've also tried using DISTINCT; I've also tried to SUM on the measure.

Not sure how to do this. Any help will be MUCH appreciated!

Thanks!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Brandon Ahmad Profile Picture
    2,465 User Group Leader on at

    I have to look at Sales Cube again, but something like this usually works.  

    SELECT {} ON COLUMNS,DISTINCT([Customer].[Customer Classification].[Customer Classification].members) ON ROWS from [SalesCube]

    If that fails than the option that always works is to use the generate function:

    csharp.wekeepcoding.com/.../How+to+get+distinct+values+for+list+returned+by+MDX%3F

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans