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

Measure the Products which have a specific color only

$
0
0

I'm working with two dimensions:

  • [Products]
  • [Colors]

For example, to return all products which are associated to RED color I can write:

SELECT {Measures.[Product Count]} ON COLUMNS,
     {[Products].[ID].Members} ON ROWS

FROM MyCube

WHERE [Colors].[Type].&[RED]

Nice. This will return Products associated to RED color, no matter they are associated to other color too.

Now, I'd like to count those products associated ONLY to RED color. For example, if product is associated to BLUE and RED it shouldn't be counted.

The snippet above will not work indeed.

The logical condition is like:

COUNT PRODUCTS WHICH ARE EXCLUSIVELY ASSOCIATED TO RED COLOR

Can anyone show the right MDX for that?

Thanks


Viewing all articles
Browse latest Browse all 2472

Trending Articles



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