We help IT Professionals succeed at work.
Get Started

SSAS MDX Range " : " not working

1,712 Views
Last Modified: 2016-02-14
Hi Experts,

I have a table that contains products and prices, eg
Price:
100,000
320,006
800,000
450,235
500,000
1,000,050

When I write an MDX query to simply get products IDs that have a price range eg from $300,000 to $800,000 (see MDX below), it returns products with prices above the max range (800,000).

SELECT NON EMPTY {  }  ON 0,
NONEMPTYCROSSJOIN    ( { [MLSListingMeasures].[ProductID].[ProductID] }
      , { [Products].[ListPrice].[ListPrice].[300000]:[Products].[ListPrice].[800000] }
          ) ON 1
FROM ProductsList

However, if I use the "exact existing" values, eg from 320,006 to 800,000 I get the correct results. So the MDx query below works
SELECT NON EMPTY {  }  ON 0,
NONEMPTYCROSSJOIN    ( { [MLSListingMeasures].[ProductID].[ProductID] }
      , { [Products].[ListPrice].[ListPrice].[320006]:[Products].[ListPrice].[800000] }
          ) ON 1
FROM ProductsList

The issue occurs not matter what ranges I use for min or max. If the values matches what exists in the db, it returns correct reulsts. This will not workk for us, as our users cannot/will not be asked to restirct their searches, but rather search in whatever range they want.

What are we doing wrong? Kindly assist. Thanks
Comment
Watch Question
This problem has been solved!
Unlock 2 Answers and 6 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE