Can I filter on variable using NoFilter ()?

Hello,

I have a strange behavior in a XI 4.0 report. I try to to describe a simplified scenario, which is still reproducable and understandable.

Imagine you build a report on Month dim. You query in the report data for 36 last months. In the report itself you show only 6 last months. So you have to filter your table with a variable ( something based on CurrentDate, MonthsBetween or adding of -183 days…). Besides of this 6 columns for 6 months, you have in the same table a column YR based on last 12 months (i.e 12 months revenue). Because YR belongs to the table which is filtered for last 6 months, you have to use NoFilter () in the definition of YR to ignore this 6-months-filter.

Ok, up to know that works. But now you want to filter this table only for fows where YR > 0 (rows with sales). You can easily filter with YR > 0. And that’s the point where I get unexpected behavior. Even if YR > 0, but the not-0-months are older than 6 months ago (and are not shown in the table), these rows disappear. I think it is wrong because YR is not 0 and my filter is based on condition YR > 0. I think the problem is using of NOFilter() in the definition of YR and filtering on this variable together with filtering of 6 las t months.

I hope this example is understandable :smiley:
I summarize:

  • you have a variable YR in the table with applied filter (last 6 months)
  • this variable YR uses NoFilter () to ignore this filter (you need 12 months)
  • now you create additional filter for the same table based on YR. Your table should show only last 6 months columns and rows where YR is > 0

For rows where YR > 0, but last 6 months = 0 you’ll get wrong filtered rows.

Please give me an idea how to workaround that :smiley:


fel (BOB member since 2008-10-21)