Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Filter Condition tool not executing as Expected

NKMM
6 - Meteoroid

Hello Experts, 

 

  Am using Filter Condition for [count] =0 if True then Generate Report and if  False then do other process but though count is 0 its generating Report 

 

 My WF 

 

      Input tool ( DB) --> Count Record --> Filter ([count]=0 ) {True Output)-> block until done (true output) ---> report Render

 

Please help me what am doing wrong and suggest to achieve this 

 

 

Many Thanks,
NKMM

                                                                                                                         

9 REPLIES 9
caltang
17 - Castor
17 - Castor

Can you provide your workflow by exporting it to us? Or if it's sensitive, can you screenshot it for us? Otherwise it's hard to diagnose.

 

I would say though that your formula looks suspect. Could be a syntax issue or even the data type for [count] may not be numeric. Let's have a look.

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
JamesCharnley
13 - Pulsar

Hi @NKMM 

 

May be misunderstanding here but as you've written it, isn't this working at expected? You say your filter condition says [count] = 0, and you've said if it's true then Generate Report, if false do other processes. Then you end the sentence with though count is 0, it's generating report, which is what should be happening if count = 0?

NKMM
6 - Meteoroid

Yes this Report needs to be Generated when count= 0 and with different template and details 

NKMM
6 - Meteoroid

Thank you for considering unfortunately  I can't upload WF but i can share screen shot Screen Shot 2023-11-07 at 8.06.45 AM.png

 

 

 

ed_hayter
12 - Quasar

At present the block until done does not stop the workflow from occurring. If you are on the newest version of Alteryx Control Containers would be good: put your report in the control container and then from the true anchor of the count filter drag that to the input anchor of the control container.

 

This is an example of them in action post filter tool. Depending on the result of the filter a different container is activated and run.

 

image.png

 

https://help.alteryx.com/current/en/designer/tools/developer/control-container-tool.html#control-con...

NKMM
6 - Meteoroid

Thank you and will try this option and revert back 

NKMM
6 - Meteoroid

We have 2022.3 so We are not able to leverage Control container tools 

 

Many Thanks,

NKMM

ed_hayter
12 - Quasar

Rereading your request I am a bit confused on what you want.

 

I have a suggestion if you want to stop a report based on a condition You could feed the count through a test tool and if it  = 0 then you could get it to return an error (substitute in the condition you want to stop a report being made here). Then in the workflow settings you could set the workflow to stop immediately upon error to stop a report being made.

 

PNG image.png

Steve314
6 - Meteoroid

What is the data type set to for the 'count' field? I have found similar problems, where zero values are being passed through the filter as if they were not equal to zero. My data type was set to 'double' and every time I ran the workflow I would get a different number of zero records passing through the filter. I changed data type to fixed decimal and now the filter tool works as expected. Not sure why this makes a difference, but it does - hope this helps!

Labels