Database Reference
In-Depth Information
SELECT {} ON AXIS(0),
Attribute([True]) ON AXIS(1)
FROM [Sample.Basic];
AND
SELECT {} ON AXIS(0),
Attribute([Caffeinated].[True]) ON AXIS(1)
FROM [Sample.Basic];
When using Date attributes, the following will not work.
SELECT {} ON AXIS(0),
Withattr([Intro Date], "==", "04-01-1996") ON AXIS(1)
FROM [Sample.Basic];
The correct way to query date attributes is to leverage the todate() function as in the
following example:
SELECT {} ON AXIS(0),
Withattr([Intro Date], "==", Todate("mm-dd-yyyy", "04-01-1996"))
ON AXIS(1)
FROM [Sample.Basic];
Lastly, to demonstrate using a numeric attribute, we use the following:
SELECT {} ON AXIS(0),
Withattr([Population], ">=", 12000000) ON AXIS(1)
FROM [Sample.Basic];
Axis-1
+-------------------
(New York)
(Florida)
(California)
(Texas)
(Illinois)
(Ohio)
6.10.1.12 Filtering on UDAs
These queries allow the user to query members based on a
user Defined Attribute.
SELECT {} ON AXIS(0),
{Uda([Market], "Major Market")} ON AXIS(1)
FROM [Sample.Basic];
OR
SELECT {} ON AXIS(0),
{FILTER({[Market].members},
IsUda([Market].CurrentMember, "Major Market"))} ON AXIS(1)
FROM [Sample.Basic];
Search WWH ::




Custom Search