on 11-21-2011 11:03 AM
Hello All,
I've a problem with WHERE clause in MDX...
my requirement is to select members from data source using several filters with WHERE clause.
e.g.
Select {Dimension1.member1, Dimension2.member1} on ROWS, {Measures.Measure1} on COLUMNS from DATASOURCE
WHERE (Dimension3.memberX, Dimension3.memberY, Dimension4.memberA ....DimensionN.memberN)
unfortunately this query in ignoring the filter settings, but if I user SINGLE dimension then it's working!!!
Could anybody know the problem behind this?
Thanks and regards
Swamy
Hi Swamy,
Your syntax looks correct. Have you tried using square brackets around your dimension ID'sand dimension member ID's ?
i.e.
SELECT FROM SalesCube
WHERE ([Time].[2004], [Geography].[Quebec],[Product].[Snorkels], [Channel].[Superstores])
Thanks,
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John,
Thanks for quick reply... I tried with square brackets too..
likeI said, its working when I use only ONE member from EACH dimension
(Time.2004, Geography.Quebec,Product.Snorkels, Channel.Superstores)
But my requirement is to use MULTIPLE members from MULTIPLE dimensions
e.g. (Time.2004, Time.2005, Time.2006, Geography.Quebec, Geography.BERLIN,Product.Snorkels, Channel.Superstores)
is there anything wrong???
thanks once again
Swamy
Hi All,
Thanks for your replies..
I found a solution where we can user MULTIPLE dimensions with respective MULTIPLE members WITH IN {} braces in WHERE clause..
we've to use CROSS JOIN
e.g.
select{...} on rows, {...} columns from... WHERE {{Dim_1.mem_11, Dim_1.mem_12}*{Dim_2.mem_21, Dim_2.mem_22}}
User | Count |
---|---|
6 | |
5 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.