Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
For example:
A | B | C | D | result |
< 5K | < 4K | < 2K | < 1K | 6% |
≥ 5K,and< 10K | ≥ 4K,and< 7K | ≥ 2K,and< 3K | ≥ 1K,and< 2K | 7% |
≥ 10K,and< 15K | ≥ 7K,and< 10K | ≥ 3K,and< 4K | ≥ 2K,and< 3K | 9% |
≥ 15K,and< 22K | ≥ 10K,and< 15K | ≥ 4K,and< 5K | ≥ 3K,and< 4K | 11% |
≥ 22K | ≥ 15K | ≥ 5K | ≥ 4K | 13% |
Above is the rule.
If I have some data like this:
Type | Amt |
A1 | 2000 |
A2 | 6000 |
A3 | 200000 |
A4 | 1000 |
B1 | 3000 |
B2 | 5000 |
C1 | 1000 |
C2 | 4500 |
C3 | 6000 |
D1 | 500 |
D2 | 1500 |
D3 | 3500 |
D4 | 4500 |
And have already grouped by functions:
Type | Group | Amt |
A1 | A | 2000 |
A2 | A | 6000 |
A3 | A | 200000 |
A4 | A | 1000 |
B1 | B | 3000 |
B2 | B | 5000 |
C1 | C | 1000 |
C2 | C | 4500 |
C3 | C | 6000 |
D1 | D | 500 |
D2 | D | 1500 |
D3 | D | 3500 |
D4 | D | 4500 |
How can I have the result?(Use many if functions?)
Type | Group | Amt | result |
A1 | A | 2000 | 6% |
A2 | A | 6000 | 7% |
A3 | A | 200000 | 13% |
A4 | A | 1000 | 6% |
B1 | B | 3000 | 6% |
B2 | B | 5000 | 7% |
C1 | C | 1000 | 6% |
C2 | C | 4500 | 11% |
C3 | C | 6000 | 13% |
D1 | D | 500 | 6% |
D2 | D | 1500 | 7% |
D3 | D | 3500 | 11% |
D4 | D | 4500 | 13% |
If I write the logic to the script, I need to call in the technical personnel of the back end. Too much trouble. I have already hard-coded the requirements on the front end.Thank you anyway.
You know I spent a lot of time with the people on my previous job to force them to move all calculations into the load script.
But it decreased load of server in 2-3 times.
In case of qlikview you have to hardcode the requirements into script as them is approved by business, because in this way you improve your app
But when you just play with data, you should have it on the frontend.
And I should add you always can have both in your application, but it should be used by end users if there is no other way.
Thank you for your advice.I need to learn push some people when necessary.