Calculating percentages

H! I have a table with answers coming from a multiple choice question. 
The counts are OK, but the percentages are not. Instead of using the correct total which is 270 and it's shown correctly in the scorecard, in the table it's using 260 to calculate the percentages.
The formula used to calculate the percentages in the table is:
CASE
WHEN 01. Known platforms = "X"
THEN X
WHEN 01. Known platforms = "Y"
THEN Y
...
ELSE NULL
END

Do you know what could be wrong? Thank you,

Captura de pantalla 2024-10-16 a las 10.20.43.png

EDIT: I have added another calculation for the percentages and it works well
SUM(CASE
WHEN regexp_contains(01. Known platforms, 'X') THEN 1
ELSE 0
END) / COUNT(01. Known platforms)

Captura de pantalla 2024-10-16 a las 17.13.06.png
But it seems like a lot of work to have these 2 columns, do you know of a simpler solution?

0 1 94
1 REPLY 1

I don't know if this is possible here, but I wonder if your 260 versus 270 issue is because the 260 is a distinct count? 

Top Labels in this Space