# Alteryx designer Discussions

## Help with the formula and summarise tools - Analysing data

Highlighted
5 - Atom

I’m a beginner at Alteryx and I’m struggling to google the right keywords to help me with what I’m trying to do, so I’m hoping I can get help here (apologies if similar questions have already been asked). I think it should be quite straightforward but I can’t figure it out!

I’ve given an example table below:

The first step I want to, is group results by Agree (= Agree + Strongly Agree) and Disagree (= Disagree + Strongly disagree)

Following that, I would like to have the results broken down by each product - so the final result would look something like this below:

Just knowing the language behind what I am trying to do would be really helpful as it will allow me to search for help, because at the moment I am struggling to find the guidance I need.

Thanks!

Highlighted
13 - Pulsar

Hi @Sampanache,

I'd first use the Multi-Field Formula to "group" (it's more a simplifying) your data:

``````IF Contains([_CurrentField_],'disagree')
THEN 'Disagree'
ELSE 'Agree'
ENDIF``````

The result looks like this:

I am not quite sure how want the % to be done. I can't see a link between your sample data and sample result. Could you explain it? Or does your real data contain multiple data rows for each product?

Best

Alex

Highlighted
15 - Aurora

Here's how I would approach it.

Highlighted
5 - Atom

Hi @grossal , thanks for your help.

There are multiple rows for each product  - so I'm thinking a frequency table would be useful?  - so for each Statement you get a summary of the percentage that Agree and Disagree - and have this split by each product (guessing this would require making separate tables at first). There are around a 1000 rows of data which vary between 8 products. For each row - you have what product it is, followed by columns which show agreement to each statement. Agreement is split into Strongly agree, agree, disagree and strongly disagree.

I'm struggling to apply the formula you provided, it's telling me I've got an unmatched bracket  I imagine I want to produce something like this?

IF [[_CurrentField_]] Contains('Disagree' OR 'Strongly disagree')
THEN 'Disagree'
ELSE 'Agree'
ENDIF

Something to apply across the whole data table?

Thank you,

Highlighted
Alteryx Partner

@Sampanache wrote:

Hi @grossal , thanks for your help.

There are multiple rows for each product  - so I'm thinking a frequency table would be useful?  - so for each Statement you get a summary of the percentage that Agree and Disagree - and have this split by each product (guessing this would require making separate tables at first). There are around a 1000 rows of data which vary between 8 products. For each row - you have what product it is, followed by columns which show agreement to each statement. Agreement is split into Strongly agree, agree, disagree and strongly disagree.

I'm struggling to apply the formula you provided, it's telling me I've got an unmatched bracket  I imagine I want to produce something like this?

IF [[_CurrentField_]] Contains('Disagree' OR 'Strongly disagree')
THEN 'Disagree'
ELSE 'Agree'
ENDIF

Something to apply across the whole data table?

Thank you,

Hello @Sampanache , try using this formula in the multi-field formula tool

Formula:

IF Contains([_CurrentField_],'disagree')
THEN 'Disagree'
ELSE 'Agree'
ENDIF

Here is the configuration of tool

Labels