Alteryx Designer Desktop Discussions

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

How to reapply '% of Total' column results broken down across all records?

CoreyS
8 - Asteroid

Hello Alteryx Community,

 

Once again, I need your support. 

 

I created a 'high-level' output but I don't know how to reapply the results back to ALL the original records at the granular level.

 

Current - 'high-level' output:

alteryx_%oftotal.PNG

 

 

 

 

 

 

 

 

Example of what I'm looking to do:

If the column [Sum_CountDistinct_PatientID] = 636, I want the column [% of Total] broken down across ALL 636 records at the granular level (i.e. If Sarah = 41.5%, how do I break down that % across all 264 records, and so on...etc.?).

 

Thanks for your support in advance!

 

Respectfully,

Corey

8 REPLIES 8
RishiK
Alteryx
Alteryx

@CoreyS 

 

You can create a new column and apply this via an IF ELSEIF ELSE statement in a Formula tool.


Let me know how you get on.

Luke_C
17 - Castor

@CoreyS 

 

If you're looking for the the Total% to repeat for all records (i.e. 41.5% repeated in each of the 264 rows for Sarah), you should be able to just join this back with the original data set. If you're looking to further break down that 41.5% there may be more involved, but in any event you'll need to join it back with the main data set. 

 

Let me know if this answers your question, otherwise could you share a screenshot or sanitized version of the workflow?

CoreyS
8 - Asteroid

@RishiK thanks for your feedback.

 

However, I'm not exactly sure what type of IF ELSEIF ELSE statement to use in a Formula tool specifically. 

 

Respectfully,

Corey

CoreyS
8 - Asteroid

@Luke_C Thanks for your feedback.

 

Currently, I'm trying to break the full percent down across all records. So basically, I will attempt to re-join back to original records.

 

Screenshot of current workflow:

%ofTotal.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Top 'Summarize tool' = all original records

Middle 'Summarize tool' = count of records that's 'Appended' to...

Bottom 'Summarize tool' = sum of records (which is the results from my initial post above)

 

Respectfully,

Corey

RishiK
Alteryx
Alteryx

@CoreyS it depends if you want to view the higher level and granular level outputs separately or apply your logic to populate in one column / one output.

Have a look at these link which will give you a good insight into the IF ELSE conditional statements in the Formula tool:

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Multi-Condition-IF-THEN-ELSE-statement...
https://help.alteryx.com/current/designer/conditional-functions

CoreyS
8 - Asteroid

@Luke_C Used the 'Join Tool' to reapply '% of Total' back to all records. Unfortunately, now the results are no longer matching my original records (i.e. total records are different and math seems to be off in terms of % of Total is same across all). As you can see there are only 22 records instead of the original 636. 

 

%ofTotal_Join_BacktoAllRecords.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Respectfully,

Corey

CoreyS
8 - Asteroid

@RishiK thank you, sir!

 

I will review the information accordingly. I'm def trying to view the results in one column / one output (i.e. desired output = all records w/ added column of '% of Total' and one output). 

 

Respectfully,

Corey

Luke_C
17 - Castor

@CoreyS 

 

There is likely a configuration issue in the join tool. Tough to say without seeing it though.

 

Attached is a quick example I mocked up based on what you described. Hopefully this helps put you in the right direction - otherwise can you provide a sample of what the output should look like? 

 

 

Labels