Count the number of occurrences and their relative % in the column

I currently have a data frame with a column of Yes/No values that basically tells if a template was used to answer a certain question.

I would like to create a cauge indicating the performance metric "Template Usage" that should be above x% - and it is basically representing the "Yes" % on the column.

I cannot find a way to represent this - I have only been able count the number of "Yes" in the column, but I cannot translate this into a %. I assume this sohuld be possible, as a pie chart is able to do this.

I would really appreciate your help here! (Below are some images)

GoncaloFVO_2-1712234487375.png

GoncaloFVO_3-1712234490858.pngThe gauge is currently counting the number of "Yes" (1785) in the colmun that has over 5000 data entires. - Ideally I would like to show 1785/6000 ~ 30%

 

 

 

 

 

Solved Solved
0 3 105
1 ACCEPTED SOLUTION

In Looker Studio, gauge charts only display one metric.

So, we need to create a metric that calculates the percentage you're looking for. We can get this by turning the YES/NO value into a 1/0 value, then summing that and dividing by the total count.

SUM(IF(<used template>, 1, 0)) / COUNT(<used template>) * 100

Once you've created that, there's just a little fiddling to do with the ranges and targets. In my example, I made ranges for every 25%, set the target to 75%, and set the max axis to 100%. Images to follow:

Screenshot 2024-04-05 at 10.53.42 AM.pngScreenshot 2024-04-05 at 10.53.27 AM.png

 

View solution in original post

3 REPLIES 3
Top Labels in this Space