Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Complex filter...

Status
Not open for further replies.

ADB1

Programmer
Aug 24, 2001
235
GB
Hi All,

I am trying to filter a table based on another dimension........

=IF <Dept> = "Finance" THEN <Age> > 4 ELSE
IF <Dept> = "Marketing" THEN <Age> > 14 ELSE
IF <Dept> = "Distribution" THEN <Age> >=0

I want to filter out different values based on the Age, however, the age is different for each Dept. When I use the abvove filter, all values are returned irrespective of the Dept.

Has anybody any ideas?!

Cheers.

A.
 
Try Trimming DEPT, I just made up a similar scenario and the trailing spaces seemed to cause a problem

=IF Trim(<Dept>) = "Finance" THEN <Age> > 4 ELSE
IF Trim(<Dept>) = "Marketing" THEN <Age> > 14 ELSE
IF Trim(<Dept>) = "Distribution" THEN <Age> >=0
 
Thanks,

I created a column in the query using a case and then filtered on that.

BO, for some reason, doesn't seem to like some CASE statements in the define filters box.

Cheers.

A.
 
Filter-actions within BO are always aimed at the underlying dataset. So, you cannot first manipulate the data displayed and THEN apply filters against them.

For the same reason filters will not work against objects aggregated within the document...

Ties Blom

 
There is only trick that will let you do what blom so eloquently described. That's by building a 0,1 varialble and then doing a report-based rank to find the top 1.



Steve Krandel
Symantec
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top