I have a situation where I want to find a percentage of the whole. For example, I have three item types, Type A, B and C. Type A has a qty of 10, Type B has a qty of 30 and Type C has a quantity of 15. The total is obviously 55. I need to see what percent 10 is of 55 and what percentage 30 is of 55 and what percentage 15 is of 55. If I create a variable call TOTAL, which is sum(qty) the results are 55 which is correct. I figured I could create another variable called Percentage, which is qty / TOTAL and get the percentage. When I drop it in the table next to Item Type, the result is always 100%. To get around this, I created a separate query to get the TOTAL, and I don't merge any objects. My second variable, Percentage, is now qty / TOTAL from the 2nd query. This works, but it seems like there should be some function that allows you to separate the total from the detail when you use it in the table. Any thoughts?
↧