Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

IF Condition with Number of Records




I am looking at a case where I can use IF condition to count number of records. I do it in Tableau all the time, not sure how it would work here. 

I see that Alteryx does not support CountIF in Formula and Count Records tool is not really helping here. Please help!


Tableau Ex: IF [Emp Loc] = 'NY' then [Number of Records] END



Alteryx Partner



You could use the summarize tool to group by [Emp Loc] and summarize the records


Hi @agrawaluk 


If you're looking for just one location, you can Filter for that location, and then use a summarize tool to count the records. The Filter effectively sets up the IF part of the CountIf, by specifying the criteria.


If you would want all records per location, then add a Summarize tool, use location as the Group By field, and another field with a Count.


Let me know if that helps.





Hi John,


Thanks for your response. I tried that and appended it with original data so as to add a new column but the number of rows multiplied. So, wasn't sure if that would work. But, I'll think over it again now.

Alteryx Partner



Take a look at the workflow below and see if this is what you're looking to do.


If Condition Num Records.png