The WITHOUT PARENT FILTER clause blocks the propagation of report filters to the report's metrics.
This clause is frequently used for computing a base value in percentage expressions. To demonstrate the capabilities of the WITHOUT PARENT FILTER, the following example uses the default date dimension to calculate the number of weekends in a specific year.
- In the Simple Metric Editor, create a COUNT metric for the number of the Date attribute.
Name this metric: # of Days.
- Create the same metric again, and add the WITHOUT PARENT FILTER clause to it.
Name this metric: # of Days (WPF).
This metric must be specified in the Custom Metric Editor:
SELECT COUNT( Date ) WITHOUT PARENT FILTER
- For the third metric, create the following in the Custom Metric Editor to divide the first metric by the second.
Name this metric: % of Weekends:
SELECT # of Days / # of Days (WPF)
- Add the Year attribute to the report.
Both COUNT metrics yield the same number for each year:
However, if the report is filtered to remove all business days from the report:
The report filter has been applied to the first metric only. The WITHOUT PARENT FILTER clause blocked the propagation of the report filter to the second metric. Now, filter the report to show only the last six years. The second metric doesn't force the report to show all years.
- Drill from years down to quarters. The WITHOUT PARENT FILTER clause remains in effect on the second metric.