COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: jburchill on 16 Jan 2019 10:58:45 AM

Title: Filter on measure??
Post by: jburchill on 16 Jan 2019 10:58:45 AM
Is it possible to filter out zero's on a measure?  I need to filter out cost that have nothing in them.
In the data item I have:
filter([RateCalc].[CostCalc],[Cost] <>0)

If I put it in the detail filter, it works, but I've read not to use detail filter.
Title: Re: Filter on measure??
Post by: CognosPaul on 17 Jan 2019 09:56:50 PM
The prohibition against detail filters is really only for dimensional sources.

If you're using an OLAP or DMR source, it's generally better design to filter the specific set you're showing on the axis using the filter function. A measure detail on a multi-axis data container in OLAP may cause unexpected results.

In your case, are you using relational? If so, use the detail filter. If it's a cube, edit the set expression to include the filter.