Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I want to automatically select some product_ids based on their cummulated % in Total Sales generated.
For example, if i want 80% (i will create a input in my script and a slider in the interface), the first 6 Product IDs will be selected.
If i want 50%, only the first two.
It will help me than to calculate a conversion rate only for the selected products.
How do i do that?
Product ID | Sales | Running Total% |
1 | 500 | 27.5% |
2 | 400 | 49.6% |
3 | 200 | 60.6% |
4 | 150 | 68.9% |
5 | 120 | 75.5% |
6 | 100 | 81.0% |
7 | 80 | 85.4% |
8 | 75 | 89.5% |
9 | 70 | 93.4% |
10 | 60 | 96.7% |
11 | 40 | 98.9% |
12 | 20 | 100.0% |
Make a variable ..as vTest and then set action on button to select value with search string ='>='& $(vTest)
one inputbox also to define value for vTest
small example
I think what you need is to look here
ok, but i need to select products, so select in field with Field = Product ID
and vTest need to be a % from Total Sales.
How do i do that?
yeah, great article, but the expression doesn't work in my case because i have a 1GB QVW and any aggr in the interface is veeery slow.
Other solutions?
Can you pre-aggregate everything at the script level? That is the only other solution... but then you loose the dynamic nature of QlikView where the pareto change based on selections.