# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Contributor

## Share of Total

Hi all,

I have a question. I have following table

 Customer Product Value A 1 10 A 2 5 A 3 10 B 1 10 B 2 0 B 3 5 C 1 0 C 2 0 C 3 10

Goal is to find out the share of a product in a Portfolio of a customer. If I select Product 1, I want to know the share of product 1 to all products of each customer. In this case it would give me following results:

Dimension Selected: Product 1:

 Customer Share A 40% B 67% C 0%

How should be the expression in set Analysis?

With my Expression I get only the share of a selected product to all products for each customer:

sum({\$<criteria_1={'yes'}>}Value)/sum({\$<criteria_1={'yes'}>}Total <Customer> Value)

In this Case I would become this:

A 50%

B 50%

C 0%

Thanks

1 Solution

Accepted Solutions
MVP

## Re: Share of Total

Try this in that case

Aggr(Sum({\$<criteria_1 = {'yes'}>} Value)/Sum({\$<criteria_1 = {'yes'}, Product>} TOTAL <Customer, Container> Value), Customer, Container, Product)

22 Replies
MVP

## Re: Share of Total

May be this

Sum({\$<criteria_1={'yes'}>}Value)/sum({\$<criteria_1={'yes'}, Product>}Total <Customer> Value)

Contributor

## Re: Share of Total

perfect, thanks!

Will try in the next days and let you know if it works

MVP

Sounds good

Contributor

## Re: Share of Total

Short Update:

The Expression in a table seems to work:

 Product Category Product Subcategory Product Customer Value Share X A Q 1 20 57% X A W 1 10 29% Y B E 1 5 14% X A Q 2 5 25% X A W 2 5 25% Y B E 2 10 50%

Now I have an additional Value (Performance by customer). In the table it is correct (Same Performance for each product by customer-->I only have the Performance by customer and not by product).

Now I Need a Point Diagramm (Dimension Product, X-Axis "Share" and Y-Axis "Performance by customer"). If I select a random customer the Point Plot is correct. But If i want to Show the Plot for all customer (no selection), the X-Axis ("share") is wrong. How is it possible?

MVP

## Re: Share of Total

Would you be able to share a sample to show what you have?

Contributor

## Re: Share of Total

Example should be the table above. Goal is a Point Plot with following expressions:

Dimension: Product

X-Axis: Share: Sum({\$<criteria_1={'yes'}>}Value)/sum({\$<criteria_1={'yes'}, Product>}Total <Customer> Value)

Y-Axis: Performance: Median({\$<Criteria_2={'yes'}>}Performance/100

Now If I select Customer 1, the Point Plot Shows the Performance of Customer 1 and the Share of all Products. E.g. Performance is 1.5% and customer 1 has 3 products, then the plot Shows all 3 products by share (X-Axis) and each product has the same Performance of 1.5% (y-Axis).

Now I de-select the customer and have again all Positions of all customers. There the share is wrong calculated.

Wrong means that the share is not calculated by each customer, but it calculates she share of each product to all products from all customer

MVP

## Re: Share of Total

I am not sure I am able to understand still... I am not even entirely sure if I will be able to recreate the chart with your issue and hence was asking you to share an app (may be with the above data) and recreate the chart and issue for me so that I can see and play around with it.

Contributor

## Re: Share of Total

how can i share an example or screenshot?

If it doesnt work: On the Point Chart it Shows me the share of Product over all customer and not the share of product in the Portfolio of a customer

MVP