Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Excluding values from script

Hi All

I have a file with status,end date and amount columns,here status is Operational and disconnected.My requirement is I need amount from rows where status is operational and also where status is disconnected but end date is of nov, dec and jan and I don't need other columns where status is disconnected and end date is of oct or other.

I used expressions like :

and (Status='Operational'

and not (Status='Disconnected' and (Month(AddMonths(today(),-3))<>Month([End Date]) and (Year(AddYears(Today(),-1))<>Year([End Date])))));

Can anyone please help me?

5 Replies
Chanty4u
MVP
MVP

Hi

try this

=if (Status='Operational' or Status='Disconnected'  and

(Month(AddMonths(today(),-3))<>Month([End Date]) and (Year(AddYears(Today(),-1))<>Year([End Date])))));

MayilVahanan

Hi

Try like this

and Match(Status, 'Operational', 'Disconnected') and Match(Month(EndDate), 'Jan', 'Nov','Dec') and (Year(AddYears(Today(),-1))<>Year([End Date])

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Anonymous
Not applicable
Author

Hi Chanty

When I am using this expression it was throwing an error like if  will take 2,3 parameters and I modified it like

(Status='Operational' or (Status='Disconnected'  and

(Month(AddMonths(today(),-3))<>Month([Cancellation Date]) and (Year(AddYears(Today(),-1))<>Year([Cancellation Date])))) but it is not returning values.Please help

Anonymous
Not applicable
Author

I have modified the expression as (Status='Operational' or (Status='Disconnected'  and

(Month(AddMonths(today(),-3))=Month([Cancellation Date]) and (Year(AddYears(Today(),-1))=Year([Cancellation Date]))))) and Status<>'TBD' and it is working for November,but I need Dec and Jan data also, do I need to add another addmonths along with this or is there any way to use monthstart or monthsstart to give 3 months data at once.Anyone please reply

sasikanth
Master
Master

May be like this

LOAD

.

.

FROM Table

WHERE Wildmatch(Status,'*Operational*', '*Disconnected'*)  AND

(End_Date>=MonthStart(Today(),-3) and End_Date<=MonthEnd(End_Date,0));