|
Home > Archive > MS SQL Server OLAP > April 2005 > filtering on a member that doesn't exist
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
filtering on a member that doesn't exist
|
|
| Michael Swart 2005-04-26, 9:23 am |
| Sorry if this is a newbie type question. The easier to answer I guess.
I have an MDX query that queries a cube with syntax that looks
something like this:
WITH
MEMBER [Measures].[Passed]
AS '([Measures].[Value], [Pass Flag].[Pass Flag].&[-1])'
SELECT { [Measures].ALLMEMBERS } ON COLUMNS
{ [Operation].[Name].ALLMEMBERS } ON ROWS
FROM MyCube
WHERE ([EquipmentLocation]
.[Name].[M=ADySite], ...
If the cube is processed from a database with no data, the query will
fail when querying a table with -1 since -1 is not yet a member of the
given dimension.
Question: What is the best way to filter query results if we don't yet
know if the member exists in the cube?=20
Michael Swart
| |
| Chris Webb 2005-04-26, 11:25 am |
| Take a look at the following entry on my blog, which should answer your
question:
[url]http://spaces.msn.com/members/cwebbbi/Blog/cns[/ url]!1pi7ETChsJ1un_2
s41jm9Iyg!166.entry
HTH,
Chris
"Michael Swart" wrote:
> Sorry if this is a newbie type question. The easier to answer I guess.
>
>
> I have an MDX query that queries a cube with syntax that looks
> something like this:
>
>
> WITH
> MEMBER [Measures].[Passed]
> AS '([Measures].[Value], [Pass Flag].[Pass Flag].&[-1])'
> SELECT { [Measures].ALLMEMBERS } ON COLUMNS
> { [Operation].[Name].ALLMEMBERS } ON ROWS
> FROM MyCube
> WHERE ([EquipmentLocation]
.[Name].[MĀ_ySite], ...
>
>
> If the cube is processed from a database with no data, the query will
> fail when querying a table with -1 since -1 is not yet a member of the
> given dimension.
>
>
> Question: What is the best way to filter query results if we don't yet
> know if the member exists in the cube?
>
>
> Michael Swart
>
>
| |
| Michael Swart 2005-04-26, 1:23 pm |
| Thanks Chris, that's a big help.
Michael Swart
|
|
|
|
|