Calculating a Percentage Based on Values in a Dimension

  • 12 January 2017
  • 2 replies

Hi all!

I’m looking for a way to calculate a percentage based on the values in a dimension.

Example: I have dimensions (average time, action type, filtered by action) and measure (count) for a look. I want to be able to calculate the percentage (based on the count) of the number of tasks that take >60 minutes to complete.

Any suggestions on how I could most easily do this?

2 replies

Userlevel 5

Hi @Taylor_Crisologo! The easiest way to do this is created a new, filtered measure in the LookML. In your case, you basically need a count that is filtered by “average time > 60”. Once you have this filtered count, you can use table calculations or a measure of type number to do the division and thus get the percentage.

Let me know if this makes sense!

Thank you very much!!