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.
SOLVED

Trying to count answers but not duplicates

jwlam
8 - Asteroid

Hi everyone!

 

I'm trying to get this workflow to count how many questions were answered. The issue I'm running into is that people are able to submit 2+ answers for 1 question due to the platform they use being glitchy so it creates multiple rows of data per answer provided even if they've already answered the question 1+ times.

 

In this section of the workflow:

I've tried Sum by Count but that gives me incorrect results since someone can answer the same question twice and Sum will double count it.

I'm also trying Unique Value by Name in Tile to only count the questions but that gives me the total max questions asked and not how many someone answered in the following Summarize.

 

jwlam_3-1657822697730.png

 

In the data provided 8 questions are asked.

John Smith answered 8 and Jane Doe answered 7.

For John Smith using Sum by Count I get 12 answered since there are 12 unique answers even though only 8 questions have been asked.

With Tile I'm getting that Jane Doe answered 8.

 

I've highlighted the answers in red that are causing the questions answered to be double counted since those are answered in a different row with a different answer.

 

jwlam_2-1657822552544.png

 

Thanks!

3 REPLIES 3
Amol_Telore
11 - Bolide

Hey @jwlam 

 

Here is my solution.

 

Amol_Telore_0-1657824378437.png

 

SPetrie
13 - Pulsar

Here is an alternative solution as well.

SPetrie_0-1657827780721.png

 

jwlam
8 - Asteroid

Thanks @Amol_Telore and @SPetrie!! 

 

I ended up using Spetrie's solution as it tied in better with the rest of the workflow.  

Labels