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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
linoyel
Specialist
Specialist

Table expression with Set Analysis

Hey all,

I need help in writing the table expression.

I have 1 dimension (Products) and my first expression counts people who were interested in that product: count(customers).

I need second expression that will calculate count(customers) for a specific product out of total count(customers) and show the result in percents...

For example, 5 people were interested in apples and 3 people were interested in oranges.

Total is 8 people.

So for the apples row, I need an expression that will do this: 5/8 *100%

And for the oranges row it will be: 3/8 *100%

Of course, all other "current selections" are supposed to stay the same.

1 Solution

Accepted Solutions
eduardo_sommer
Partner - Specialist
Partner - Specialist

It's count(customers)/count(TOTAL customers)

Eduardo

View solution in original post

6 Replies
Not applicable

try this:

count(customers) / count({<Products = >}customers)

if you have any other dimensions then Products you also have to use them in set analysis.

regards,

MT

eduardo_sommer
Partner - Specialist
Partner - Specialist

It's count(customers)/count(TOTAL customers)

Eduardo

Anonymous
Not applicable

Try out:

(count(customers)/count(total customers))*100

Regards

Nitin

tresesco
MVP
MVP

I guess the solution was suggested in other thread here holds good. Did you you try that? Otherwise, try to post your sample qvw.

linoyel
Specialist
Specialist
Author

Thank you

This worked

linoyel
Specialist
Specialist
Author

Yes, thank you!

I didn't think it was THAT simple!

Already checked your answer as a correct one in a first thread