Hi, I am using the filter tool to exclude some data with the following conditions. I am not getting it right.
I want to exclude the records if one of the following conditions is met.
!IsNull([Project Code])
!IsInteger([Project code])
[Total Amount] != 0
I tried like this !IsNull([Project Code]) OR !IsInteger([Project Code]) OR [Sum of Amount] != 0
Any help would be appreciated. Thanks
Kuha
Solved! Go to Solution.
Can you share some sample data? Try changing your ORs to ANDs.
@Kuha maybe I'm stating the obvious, or have missed something:
What you want, and what you tried are two different things? Look at the highlighted parts. Yellow doesn't match yellow, etc
First I wanted to say sorry for the mixup of the data field. The Row Label and Project code are the same and I have now corrected them in my original mail.
Here is the sample data:
What I am trying to do is extract some data from an existing Excel file. The Project code field is a string field and may have blanks and alpha characters.
What I am trying to do is: Exclude the line
If the Amount is 0
if the Project code is Alpha char or blank
I tried to filter it using 3 separate filters and it works fine. But I am trying to do this one filter.
Project code | Sum of Amount |
4122 | 208.15 |
4124 | 163.11 |
4125 | 0.00 |
4126 | 0.00 |
4127 | 236.52 |
4128 | 169.20 |
4134 | 0.00 |
Total | 776.98 |
@Kuha hey, don't be sorry. Just wanted to check as a first line of defence if that was the case 😊.
I've updated the original data to contain some checks:
Output after applying your filtering conditions:
So, how to build what you wanted in the filter.
The Sum of Amount field must not be 0 AND (project code is not null AND project code must be an integer).
You may not need the parenthesis around the last part, I just tend to put them there as it made sense in my head. It should still work without them as it's multiple AND statements.
Just as an added bonus, there's another way to filter using RegEx:
Sum of Amount !=0 AND project code only contains numbers 😀.
In RegEx:
\d means a number
+ means one or more occurrences of this
\d+ therefore, means, one of more occurrences of a number (it will say false if any other characters are present).
It works fine. Learn something new today. Thanks for all your help.
xx
Hi,
Sorry, I messed up here. I don't know how to change your response to the accepted solution.
Kuha