Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Subtotal with conditions

Hi there,

I would like to calculate the percentage of only one row (see example).

the conditions would be something like this:  Sum (Sales) / Sum (Total Sales) if Brand = A

Example:

 

BrandSales
A420%
B5
C11
20

How to you write this ecuation?

Thanks,

Roberto

2 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Try this.

Sum({<Brand = {"A"}>}Sales) / Sum(Total Sales)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
jolivares
Specialist
Specialist

You have two way:

1. Sum(If(Brand='A',Sum(Sales)/Sum(Total Sales))

2. Sum({<Brand={'A'}>} Sales)/Sum(Total Sales))

I prefer the second one...