Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Friends,
Suppose I have two columns (NAME and POINTS) like this:
NAME | POINTS |
John | 4 |
Jack | 3 |
Mary | 6 |
Louis | 2 |
Robert | 1 |
Sam | 7 |
John | 5 |
Louis | 3 |
Tom | 9 |
with each name potentially appearing more than once.
I have built a small box to display the sum of points (merely SUM(POINTS)) and, when I select John in the above example, the box shows 9 (since 4 + 5 = 9).
Now, I wish to build another box, to display the percentage which this points represents over all the set of names. In the above example, since the column POINTS sums 40, if no one is selected, I want the box shows 100% (= 40/40) and, if I select John, I want the box shows 22,5% (= 9/40). Is it possible?
Many thanks in advance.
Use this expression:
sum(POINTS)/sum({<Name=>} POINTS)
The denominator uses set analysis, {<Name=>}, to ignore the user's selection in the Name field, returning the total points.
This expression will ignore ALL selections, rather than just the user's selection in the Name field:
sum(POINTS)/sum({1} POINTS)
Use this expression:
sum(POINTS)/sum({<Name=>} POINTS)
The denominator uses set analysis, {<Name=>}, to ignore the user's selection in the Name field, returning the total points.
This expression will ignore ALL selections, rather than just the user's selection in the Name field:
sum(POINTS)/sum({1} POINTS)
Worked! Thank you very much!
Only one observation: you wrote "Name" (lowercase) and the formula didn't work. But when I changed to "NAME" (uppercase, like the real name of my variable), it worked.