In a mondrian xml file, I have a dimension which is tied to a bit (boolean) datatype in a SQL Server table. While I understand how it works, it seems like there should be a better way.
We want the user to see "Yes" or "No" as the values. There will only be a 1 or 0 in the table (no nulls on the column). The developer coded it as
CASE WHEN IsPost = 0 THEN 'No'
WHEN IsPost = 1 THEN 'Yes' ELSE ''
As a result of this coding, when a filter is selected on this dimension, the entire table is scanned, doing the CASE statement on every row.
Is there a way
- To indicate that the dimension will only have a 0 or 1 value (without having to scan)?
- To default a 0 to be labeled as "No" and a 1 as "Yes"?