9 Replies Latest reply on Jan 14, 2017 2:28 PM by Norbert Maijoor

# Sum of Specific Dimension / Sum of Another

Hi all,

I'm having a spot of bother with a calculated field.

I have a list of factors lined up in one column.

What I'm looking to do is to divide the sum values where the factor is "number of transactions" by the sum values where the factor is "visitors".

Something along the lines of

sum(if [Factor]="Number of Transactions" then [Number of Records] end)

/

sum(if [Factor]="Visitors" then [Number of Records] end)

Except I want to sum the values rather than the number of records. Is this possible?

Many thanks,

Eoghan.

• ###### 1. Re: Sum of Specific Dimension / Sum of Another

Hi Eoghan,

Not perfect yet.... but find my approach as reference below and stored in attached workbook version 9.3

if attr([Factor])="Bounce Rate" then mid(str(sum([Actual]*100)),1,5)+"%"

elseif attr([Factor])="# of transactions" then STR(sum([Actual])) end

• ###### 2. Re: Sum of Specific Dimension / Sum of Another

Hi Norbert,

Many thanks for taking the time to do that up.

I can see it does show both factors required in the calculation. Is there any way to set this up that it completes the calculation itself in the calculated field?

• ###### 3. Re: Sum of Specific Dimension / Sum of Another

Hi Eoghan,

Not sure if I understand your question. Could you elaborate?

• ###### 4. Re: Sum of Specific Dimension / Sum of Another

No problem Norbert, thanks.

In your calculated field you see both the number of transactions and the bounce rate in the table.

However, would I would like to see as a result of the calculated field is:

# of transactions / number of visitors

i.e. I would like to see the calculation/result rather than the two individual components side by side.

• ###### 5. Re: Sum of Specific Dimension / Sum of Another

Good morning Eoghan,

Find my approach based on your explanation. Is this the directions you would like to go for?

• ###### 6. Re: Sum of Specific Dimension / Sum of Another

Effectively yes. The only difference being I'll be dividing by Visitors rather than multiplying by the Bounce rate, but that is a moot point, the key is being able to make the calculations between different responses under the same dimension.

How did you do that?

• ###### 7. Re: Sum of Specific Dimension / Sum of Another

Good evening Eoghan,

The following:

Bounce Rate: if [Factor]="Bounce rate" then [Actual] END

# of Transactions: if [Factor]="# of transactions" then [Actual] end

# of transactions * Bounce Rate: sum([# of transactons])*sum([Bounce Rate])

1 of 1 people found this helpful
• ###### 8. Re: Sum of Specific Dimension / Sum of Another

Norbert,

You the man! This worked perfectly.

Thank you so much for your tenacity and helpfulness on this, it's really appreciated.

Eoghan.

• ###### 9. Re: Sum of Specific Dimension / Sum of Another

Eoghan,

You are welcome. Once again...Thanks for the "points". Appreciated.

Keep posting on the forum concerning your challenges. There a lot "peaps" around willing to help.

Have a nice one.

1 of 1 people found this helpful