Spotfire - Finding the percentage contribution of each Cell

3.1k views Asked by At

I am trying to find the percentage contribution of each cell in a cross table in spotfire.

The table looks like this

Group     Name     Score
1         Andy     80
          Bill     70
          Charlie  90
2         Andre    100
          Bob      60
          Clint    70

I want to make the table to show something like this

Group     Name     Score   Percentage
1         Andy     80      33%
          Bill     70      29%
          Charlie  90      38%
2         Andre    100     43%
          Bob      60      26%
          Clint    70      30%

Where each percentage is the score of each person divided by the total of the score in each group so for Andy = 80 / (80+70+90) = 33%

My code so far is this

Count([Score]) / Count([Score]) OVER (Intersect(Parent([Group]),All([Name])))

I am not sure which part I get wrong. Please help.

1

There are 1 answers

1
newb On BEST ANSWER

After I try few combinations I have found the answer myself. I'll leave my method here so anyone who also trying to fix similar problem might be able to get a clue

Count([Score]) / Count([Score]) OVER (Intersect(Parent([Axis.Rows]),All([Axis.Rows])))