Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friends
I have following sales data in a worksheet
| Dept | Prd | Amount |
| 1 | A | 2000 |
| 1 | B | 1000 |
| 1 | C | 3000 |
| 1 | D | 4000 |
| 2 | A | 2500 |
| 2 | B | 1500 |
| 2 | D | 5000 |
| 2 | E | 6000 |
| 3 | E | 3500 |
| 3 | D | 8500 |
| 3 | C | 1000 |
| 3 | B | 5000 |
When I load data I want to modify the script to have another column in the table showing the % of sales of each Prd in each dept
In other words my table view should show data in following format. Pls help me to modify the script to obtain what I want . I have attached my QVW pls
| Dept | Prd | Amount | Ratio |
| 1 | A | 2000 | 20% |
| 1 | B | 1000 | 10% |
| 1 | C | 3000 | 30% |
| 1 | D | 4000 | 40% |
| 2 | A | 2500 | 17% |
| 2 | B | 1500 | 10% |
| 2 | D | 5000 | 33% |
| 2 | E | 6000 | 40% |
| 3 | E | 3500 | 19% |
| 3 | D | 8500 | 47% |
| 3 | C | 1000 | 6% |
| 3 | B | 5000 | 28% |
There has to be a KEY to associate. In your sample I don't see a key field. You might have to create a composite key for the same. Go through your tables, I am sure you would get one.