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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Multiple 'Set Variable' in actions

I do a pareto analysis on the Sales value (80%) of the top x customers.

The problem is the following:

I want to show how many of how many customers make up the 80% sales.  eg:.(49 of 728 customers selected (6.7%)

My approach was: 

In the actions tab of the button;

- set variable vCntCustomers = count (distinct Customers)

- Pareto Select

- set variable vCnt CustomerSelected = count (distinct Customers)

(to store the number of customers before the pareto)

I learned this does not work because all variables are set at the same time.

I cannot use "all" because the pareto has to work within a selection made by the user.

What would be a better approach to achive this

Thank you

1 Solution

Accepted Solutions
swuehl
MVP
MVP

You can try an approach as shown here:

So How Many Customers Make Up Most of Your Sales?

Very similar to your approach, but using an alternate state for the pareto select.

Then the count percentage calculation would be

= Count({AlternateState} DISTINCT Customer) / Count({$} DISTINCT Customer)

View solution in original post

2 Replies
swuehl
MVP
MVP

You can try an approach as shown here:

So How Many Customers Make Up Most of Your Sales?

Very similar to your approach, but using an alternate state for the pareto select.

Then the count percentage calculation would be

= Count({AlternateState} DISTINCT Customer) / Count({$} DISTINCT Customer)

Not applicable
Author

Thank you for your quick response

It solved my problem 🙂