Announcements
cancel
Showing results for
Did you mean:
Contributor

## Get a % of Selections compared with the total

Hello!

I'm looking to get the percentage of the sum of part of a selection.

I have a selection called channels where my products are sold. Some of the values are 'supermarket' or 'discounters', but the ones I want to look at are online channels.

I want to get the Net Sales Income percentage of the channels that are online.

I'm looking at doing something like:

sum({<Channel={'Sup-Online'},Channel={'Spclst-Online'},Channel={'Dept-Stores Online'},Channel={'B2C-MH E-Stores'}>}kpi_NSI)

divide this by the total kpi_NSI, and present that as a percentage.

Please note that I am trying to do it in a way that means I can then view the percentages by another dimension (by Country). I know that aggregations might be something I need to consider.

Has anybody faced this sort of problem before? I've found the similar posts a little confusing to carry over to my particular problem.

Any help would be great, thank you!

Labels (3)

• ### set expressions

3 Replies
Contributor III

Hi,

Idk if I understand correctly,

can you show an image of your values by Channel and what should be the result of the measure?

Anyway, the problem may be your set expression, try this:

sum({<Channel={'Sup-Online', 'Spclst-Online' , 'Dept-Stores Online',  'B2C-MH E-Stores'}>}kpi_NSI)

Contributor
Author

Hi Jean,

Thanks for the suggestion but it still doesn't work.

kpi_NSI contains a company made sales figure. what I need is, of the selection 'channel' how much is the online channels as a  % of the total channels.

like this:

sum({<Channel={'Sup-Online', 'Spclst-Online','Dept-Stores Online','B2C-MH E-Stores'}>}kpi_NSI)/sum(total Channel)

but I just get a blank chart.

To answer your questions. What should be the result? it should be a single bar chart that shows the % NSI generated by online channels, compared with the total channel selections.

I'm not sure what you mean by show an image of your values by channel.