This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I'm a new Alteryx user...trying to solve a problem:
Given the input data below, i need to output one row per User based on the following rules:
1. if Course Name = Cert Exam then 1 else 0 2. if Course Name = Sales Exam - New and Product Exam - New then 1 else 0
* Note for user4 below, they completed both the old and new exams, but only need to be counted once
User Course Name
email@example.com Sales Exam - New
firstname.lastname@example.org Cert Exam - Old
email@example.com Cert Exam - Old
firstname.lastname@example.org Product Exam - New
email@example.com Cert Exam - Old
firstname.lastname@example.org Sales Exam - New
email@example.com Product Exam - New
firstname.lastname@example.org Cert Exam - Old
email@example.com Product Exam - New
firstname.lastname@example.org Sales Exam - New
email@example.com Sales Exam - New
firstname.lastname@example.org Sales Exam - New
email@example.com Product Exam - New
firstname.lastname@example.org Sales Exam - New
email@example.com Product Exam - New
firstname.lastname@example.org Sales Exam - New
email@example.com Product Exam - New
Since you are new to Alteryx, I thought I would take what @JoeM provided and what @DataBlender suggested along with another less "elegant" workflow to show you that there is not really a "right" answer (it's more about does it get you what you need). As you can see, there are a number of ways to get to what you need.
As you approach a data problem like your question, I like to suggest that you think about the steps your mind would take to solve the problem and then just "draw it out" in Alteryx. Your mind may approach the problem a little differently than someone else, but with Alteryx it really doesn't matter.
Hope this helps with letting you "think outside the box" in how to approach data problems with Alteryx.
Problems to be avoided using one solution over another? Not really, we are just experiencing the artistry of Alteryx allowing people to build workflows the way they think!
How I was thinking for this solution:
I typically opt to concat with a crosstab for more control over field size. My solution's concat result came out as a v_string with a length of 2048 (default but configurable), while your solution probably was a v_string with a length of 2147483647 (non-configurable). I don't expect the performance to be any different since it's a v_string, but I personally like keeping things tight. Also, the crosstab method can have the upside of specifying what character to use to seperate the fields which adds the the flexibily of the tool.