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

"share" expression in a chart

HI,

The data I have is a product, its sales in each quarter and year.

One bar-chart tells me each product sales in each period - sales.

In the second bar-chart I wish to show the share of each product.

I have tryed with the expression "sum(sales)/sum(all <quarterinyear >sales)" and marked the field of relative.

As long as I choose only period of time, it gives me the correct percentage.

However, if I choose only one product - it gives me 100%.

I have attached the data and desired results as shown in excel.

How can I fix the expression to get the correct result?

Thanks,

Ronit

4 Replies
maxgro
MVP
MVP

sum(sales) / sum(TOTAL <product> sales)

Anonymous
Not applicable
Author

Dear Massimo,

Maybe the example I gave was inccorect. Sorry...

I will need for each product, its share from total sales of all products in the chosen period.

When I show all products, the calculation is correct.

But when I choose only product a (for example) it calculates 100%.

I hope I am more clear now.

Thanks,

Ronit

Agis-Kalogiannis
Employee
Employee

Can you please try the following:

sum(sales)/sum(all <product> sales)

Thanks

Agis

Anonymous
Not applicable
Author

Hi,

you can use sum( Sales)/sum(TOTAL <Product> Sales) without Relative option, but check, in Number tab, "show in percentage" and "Fixed to" 0 decimals.

KR,

Elena