Skip to main content

Hi,

 

I am currently using this code: SUM("Sheet1"."Column1".'1' / SUM("Sheet1"."Column1")

 

and I am essentially trying to find out how many 1s, 2s, and '-' there are, in the form of a percentage.

 

I tried doing "Sheet1"."Column1".'1' so specific which value I am trying to calculate but I don;t think the code is correct?

 

Thanks,

Terence

Try using

COUNT(CASE WHEN "Sheet1"."Column1" = '1' THEN 1 ELSE NULL END)/COUNT("Sheet1"."Column1") - this will calculate the % of '1's in the full population


Reply