Issue in a calculated field with Looker Studio

I need to show the difference in percentage about a sales metric, I’m using a calculated field, but the results are incorrect.

For example: if I use direct values to calculate the metric, like (920000 - 388000)/920000 the result is ok, but when I use a dimension and a parameter like (meta_jan - Valor)/meta_jan where meta_jan is a parameter and Valor is a dimension…the result is totally wrong.

CORRECT

INCORRECT

When troubleshooting something like this, the first thing I try to understand is what values the system is inputting for the variables - if you just create a calculated field to show the value of each of the fields in your incorrect calculation (meta_jan, Valor) what do you see?

@saucam77
why are you using dimension?

1 Like

Hello Gavin, I did what you said and after that I created a calculated field using AVG (meta_jan) and SUM(Valor), it is working well now.

Thanks!

1 Like