Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Product of all Percentage of all rows in a table-diagram

Hi,

I have a nice problem:

There is a table (diagram) containing a number of rows, a dimension and a percentage:

AccountPercentage
A50%
B30%
C60%

What I want to see, is the product of all percentages (50% x 30% x 60% -> 0.5 x 0.3 x 0.6 -> 0.09 -> 9%) as a column:

AccountPercentage
A9%
B9%
C9%

How can I achieve this?

Thanks a lot in advance,

Martin

11 Replies
Not applicable
Author

Here we go. 🙂

swuehl
MVP
MVP

I think something like

exp(sum(total aggr( log( Expression3/Expression1),TransID)))

in fact does work also in your example. It's just that your numbers are getting pretty small (note that we use a Product function here...).

You also have sometime multiple records per TransID, so you might want to use an aggregation on the percentage, maybe

exp(sum(total aggr( log( sum(Expression3)/sum(Expression1)),TransID)))

or

exp(sum(total aggr( log( sum(Expression3/Expression1)),TransID)))

depending what you want to achieve.

edit: see attached your data with more decimal places added