If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

filter accounts if last two month sales is zero

Started by cognos05, 26 Oct 2015 07:16:39 PM

Previous topic - Next topic

cognos05

Hi,

I am filtering accounts whose last 2 month sales is zero using expression

Filter(accounts , aggregate(currentMeasure with in set([last2Months])=0)

This works fine but when there is data like

                  Aug 2015      Sep 2015
Account1      0                   0
Account2      -5                  5

-5 and 5 then sum of these 2 months becomes 0 , but I dont want to filter these accounts meaning there was some transaction in these accounts.

So how can I get the same using other filter criteria

Thanks,
Nithya




BigChris

Can you calculate the absolute value of the sales, so that -10 becomes 10 for example? Then use that in your filter statement...

cognos05

Yes ( abs (measure) within set (last2months)) worked !!

Thanks,
Nithya

BigChris


colt

It's obvious:
Instead of Filtering:  aggregate(currentMeasure with in set([last2Months])=0
You should use Expression:   (Aggregate(currentMeasure within set([lastMonth])=0  AND Aggregate(currentMeasure within set([l2Month])=0)

But even then: if there are Transactions within 1 month that total up to 0 and this is the case for both months, then they will be filtered.
Therfore it might be better to use instead Maximum(Abs(currentMeasure within set([last2Months])) > 0