Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

need help in conditional filtering.

anonymous008_G
8 - Asteroid

Hi,

 

Can someone please help me? how can i filter below table with condition where Date is month-end date for those records if MV is not equals to 0 and Capcon or Dist is equals to 0. only those records to come in the final table along with those non month-end date records.

Input table:- 

 

DateCapConDistMV
10/18/202410000002000000
3/31/2025006000000
11/10/2021800000010000000
11/22/20215000000014000000
12/17/20219200000018000000
5/4/202213400000022000000
12/14/202217600000026000000
2/5/202421800000030000000
3/31/202503400000034000000
3/31/20250038000000

 

Expected output :-

DateCapConDistMV
10/18/202410000002000000
3/31/2025006000000
11/10/2021800000010000000
11/22/20215000000014000000
12/17/20219200000018000000
5/4/202213400000022000000
12/14/202217600000026000000
2/5/202421800000030000000
3/31/20250038000000
5 REPLIES 5
Diederik_vanderharst
8 - Asteroid

Hi! Try this:

If 
[Date] = Datetimetrim([Date], "Lastofmonth")
and [MV] = 0
and ([CapCon] != 0 or
[Dist] != 0)
Then 'False'
Else 'True'
Endif

Maybe I misunderstood some of your rules, but I think the condition of the date was the most difficult, so I'm guessing you'll get there now.

anonymous008_G
8 - Asteroid

@Diederik_vanderharst - Thanks for your response. but this is not working; maybe we need some different approach. Basically, I want to get rid of the records where Date is month-end and MV and CapCon, or Dist is not equals to 0. 

anonymous008_G
8 - Asteroid

If this is something confusing, can you please advise using formula tool how could i create new column which will flag month end date yes and non month end dates as no.

Qiu
21 - Polaris
21 - Polaris

@anonymous008_G 
There is a formula " DateTimeTrim([Date_Out],"lastofmonth")" can easily get the last day of the Month, after we convert the "Date" column to DateTime format.

I was not fully understand the criteria about "and MV and CapCon, or Dist is not equals to 0. " and can not be sure about logic of And and Or.
So maybe you can change the formula in the Filter tool a bit. 

0605-anonymous008_G.jpg

anonymous008_G
8 - Asteroid

Hi,

 

I managed to get the desired output. appreciate your response on this. Thank you

Labels
Top Solution Authors