Question

How to get counts

  • 4 October 2021
  • 1 reply
  • 12 views

I have records that have a field called `Compliance Framework` which can be [x,y,z,other]. I want to get a count of how many records there are for each “compliance framework” and then to visualize that as a pie chart


1 reply

Userlevel 1

Hey Jordan!

We would need 2 fields here:

  1. a dimension `Compliance Framework` and
  1. a measure of type “count” which will be counting the records in your dataset (https://docs.looker.com/reference/field-reference/measure-type-reference#count)

 

So, when you select these 2 fields you will get exactly the result you want - your data will be grouped by distinct `Compliance Framework` values and they will have the count for each value.

 

And you select the pie chats in the visualization tab after that

 

 

Reply