Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculate share on total grouped by another value

Hello all,

I have the following data;

Product,Category,Value

A,X,46

A,X,89

B,X,69

B,X,62

C,X,84

C,X,65

D,X,1

D,X,64

E,Y,7

E,Y,4

F,Y,87

F,Y,20

G,Y,97

G,Y,30

H,Y,24

H,Y,63

I,Y,60

I,Y,2

J,Y,19

J,Y,51

As a result I want the next table.

2011-05-18 16.3208.gif

The share is  based on the total grouped by category, but i do not want the category in the table. Every product has one category.

see the atached QV example.

Can anybody help me out here, thnx in advance!!

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

Hi,

Find attached with the solution. You need to use the expression below.

Sum (Value) / aggr(NODISTINCT sum(Value),Category)

Please let me know whether this issue is resolved.

Best Regards,

Sajeevan

View solution in original post

2 Replies
Not applicable
Author

Hi,

Find attached with the solution. You need to use the expression below.

Sum (Value) / aggr(NODISTINCT sum(Value),Category)

Please let me know whether this issue is resolved.

Best Regards,

Sajeevan

Not applicable
Author

Thank you very much, this solves the problem!