I expect there are lots of ways to approach this one, so I went with a simple one.
With QuestionID in the view, I created a calculated field to count the number of replies.
sum([Number of Records])
you could replace that with a count or even a count distinct if there might be duplicate records that you don't want to count twice.
Then I created an indicator at the QuestionID level based on this count.
More than one reply:
if [Message Count]>1 then 1 else 0 end
Then to get the percentage I just needed:
window_sum([More than one reply])/window_sum(Max(1))
Computed along QuestionID, this will add up the indicators from the previous step. In the denominator I am also using a window_sum which will give the number of QuestionIDs without qualification. This will result in a value for each question id (the same value), so to clean things up I limited to the first one.
if first()==0 then window_sum([More than one reply])/window_sum(Max(1)) end
and to get the % who didn't respond I subtracted this from 1.
% Didn't Respond:
Does that do what you need?
PercentReplied.twbx 32.0 KB
Great - thank you very much. This seems indeed the right calculation for me!
I went the wrong way when using the window_sum, but you helped me out on that one.
Glad I could help. Table calcs are fun, but first they are confusing. You get a hang of partitioning you can make calcs on top of calc on top of calcs with each going in a different direction!