Alteryx Designer Desktop Discussions

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

Get Count and Percentage of True and False

skotian1289
8 - Asteroid

Hello All,

 

Apologies if this is a stupid question but I am new to designer and I am struggling to get my data in a certain pattern. If in excel it would have easy to do it but since I am getting used to alteryx I am trying to figure out . Below is sample of what I am trying to do. I am trying to count the TRUE, FALSE and their percentage and get it in a specific pattern.

 

Sample data:

Column A   Column B  Column AB Results     Column C    Column D   Column CD Results    Column E    Column F    Column EF Results
       X               X                    TRUE                       Z                   X              FALSE                           Y                Y                  TRUE
       Y               Y                    TRUE                       Z                   Z              TRUE                             Y                 X                  FALSE
       X               X                    TRUE                       Z                   X              FALSE                            Y                Z                  FALSE
       Y               Y                    TRUE                       Z                   Z               TRUE                             Y                X                  FALSE
       X               X                     TRUE                       Z                   X              FALSE                            Y               Y                  TRUE
       Y               Y                     TRUE                       Z                  Z                TRUE                             Y               X                  FALSE

 

 

Expected Output:

Status            Column AB Results      %Column AB      Column CD Results      %Column CD       Column EF Results      %Column EF

TRUE                       6                                 100                          3                                 50                            2                          33.33
FALSE                      0                                   0                            3                                 50                            4                         66.67

Total                         6                                 100                          6                                100                           6                           100

 

Regards

5 REPLIES 5
jdunkerley79
ACE Emeritus
ACE Emeritus

You will want to use the Summarize tool to produce the results. It will calculate the counts.

 

In order to produce a Total you will need a second Summarize tool and then Union it onto the first set.

 

You can then use a Formula tool to produce the percentages.

 

Hopefully, this is enough for you to work out how to build it but can make you a sample if you need.

 

 

 

 

 

skotian1289
8 - Asteroid

Hi @jdunkerley79 

 

Thanks for your response, it would be really helpful if you could show me a workflow sample using my sample data because that will help me understand better as to how alteryx tool works in this scenario.

 

Regards,

 

jdunkerley79
ACE Emeritus
ACE Emeritus

Was a little more fiddly than I thought:

jdunkerley79_0-1591864366797.png

 

- Use summarise to count each column by True/False

- Use Count records to get the total records

- Use append fields to add total to the count of each column and then compute the Percent

- A Join multiple to make a single table

- For the total row, a set of formula tool to reproduce

- Union to put together

 

Sample of this is attached

skotian1289
8 - Asteroid

Hi @jdunkerley79 

 

Thanks a lot for your response.

 

This solution actually came to my mind but the problem with this solution is what if there around 200 odd columns like AB, CD, EF... in that case it is not feasible to add a summarize  tool for each and every single column. Do you agree ?

 

Regards

jdunkerley79
ACE Emeritus
ACE Emeritus

Agree - in which case you can do a transpose and cross tab style solution.

 

Sample attached doing it that way

Labels