Quantcast
Channel: SQL Server Analysis Services forum
Viewing all articles
Browse latest Browse all 14337

MDX filter multiple attributes with OR

$
0
0

The question is simple. I need a full list of Product (EnglishProductName, EnglishDescription, Class, Color,...) whose EnglishProductName like '%bike' OR EnglishDescription like '%bike%'. The "bike" has to be a parameter. How can I use MDX to query AdventureWork? I tried using Having, it worked but slow.

 SELECT NON EMPTY { } ON COLUMNS
, [DimProduct].[EnglishDescription].[EnglishDescription].ALLMEMBERS*[DimProduct].[EnglishProductName].[EnglishProductName].ALLMEMBERS
HAVING Instr([DimProduct].[EnglishDescription].currentmember.Properties( 'Member_Caption' ), "bike" )  > 0 OR
 Instr([DimProduct].[EnglishProductName].currentmember.Properties( 'Member_Caption' ), "bike" )  > 0
on rows

FROM [Model]

Any help will be appreciated.


Viewing all articles
Browse latest Browse all 14337

Trending Articles



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