9 Replies Latest reply on Mar 29, 2017 4:06 AM by Nagarajan R

# Calculate on row and roll up

All,

I have 2 name fields and I want to match those, then on the overall name I want to display the count number. For example:

Name1                    Name2

Paul                         Paul

Paul                         Paul

Paul                         Other

Jonathan               Jonathan

Jonathan               Other

Jonathan               Other

What I need:

Name1               Count

Paul                       2

Jonathan               1

I now use this formula: if Name1 = Name2 then 1 end. This works on the lowest level, but as soon as I roll it up it just counts all records and Name1 is the same number as name2

Hope you can help!

Regards, Paul

• ###### 1. Re: Calculate on row and roll up

Hi Paul,

Can you please let us know at what level you are rolling up your data?

It will help if you can give a sample/example of your lowest level (including fields) of data and a snapshot of what you mean by roll up?

Thank you

Nagarajan

1 of 1 people found this helpful
• ###### 2. Re: Calculate on row and roll up

Dear Nagarajan,

The data looks exactly like the first table I gave with the 2 names (but then 8000 rows). That is how I am rolling up

Regards, Paul

1 of 1 people found this helpful
• ###### 3. Re: Calculate on row and roll up

Hi Paul,

With your current formula you are getting below right ? Can you please give exmple of how you want to roll?

Name1              Count

Paul                      2

Jonathan              1

1 of 1 people found this helpful
• ###### 4. Re: Calculate on row and roll up

No I was needing that, I was not getting that result.

Strange why you do get that result straight away

1 of 1 people found this helpful
• ###### 5. Re: Calculate on row and roll up

Happy to help !!!

Cheers ! MD

1 of 1 people found this helpful
• ###### 6. Re: Calculate on row and roll up

Hi Paul,

check the workbook attached herewith.

Regards,

Sonali.

1 of 1 people found this helpful
• ###### 7. Re: Calculate on row and roll up

Hi Paul,

IF "NAME 1=NAME 2 THEN 1 ELSE 0 END" is expected to give the result you want by default. PFB the base data and the calculation applied.

What aggregate function did you use?

Thankyou

Nagarajan

1 of 1 people found this helpful
• ###### 8. Re: Calculate on row and roll up

Hi,

I think the key was in the aggregate function around the calculation

Regards, Paul

1 of 1 people found this helpful