View Full Version : hmmm...boolean dimension?

10-12-2003, 05:53 AM
question here... i have a base table with several boolean columns - indicating cancelled status of an invoice etc...
whats the best way to filter according to these columns - ie -show only those where cancelled=false? the dimension keeps giving me two vaules to choose from, and I don;t want that. just the one visible. Is there a solution for this - a "where" condition in the dimension or something? or do I have to use views to achieve this?

10-12-2003, 11:10 AM
You can add a dimension in your schema: see "A dimension can live in a fact table" in the Mondrian "Writing a schema" documentation ie.
<Cube name="Sales">
<Table name="sales_fact_1997"/>
<Dimension name="Cancellation">
<Hierarchy hasAll="true">
<Level name="Canceled" column="canceled" uniqueMembers="true"/>
and a where clause in your MDX query.
select {[Measures].[Unit Sales], [Measures].[Store Sales]} on columns,
{[Time].[1997].[Q1].descendants} on rows
from [Sales]
where [Cancellation].[true]
The JPivot Slicer manipulates the MDX where clause.

10-14-2003, 06:29 AM
i want to show only those customers where age > 40 . age is a member property. the solution described above is not really what i need.
how can i do that with MDX?