Solved

Using IF formula in a Metric

  • 8 August 2022
  • 2 replies
  • 153 views

Userlevel 2
Badge +1
  • Seasoned Pigmenteer
  • 22 replies

Dear Community,

 

I have the following formula in a metric coming from two other metrics 'MRR BE + Ajouts manuels and MRR Facturé (= Comptable)

 

The result of the metric is neither of the two metrics coming from the IF formula,

Would you point in the right direction? or help me figure out what is wrong with the formula?

 

Thank you very much in advance!

Jose

icon

Best answer by Nathan 8 August 2022, 13:56

View original

2 replies

Userlevel 6
Badge +11

Hi Jose,

 

same as the last one, most likely an issue of dimensions. Are the two dimensions for each of these 3 metrics the same ?

 

Run the formula in the playground and see what the result is.

Userlevel 6
Badge +14

Hi Jose,
It’s not super clear but my guess would be that you have more than the two main dimensions in your Renew after current month ? metric.

Pigment will see this IF statement and try to align the dimensions, so if your Renew after current month ? metric is by something else like Client, Pigment will effectively do something like ’MRR Facturé (= Comptable)’[ADD: Client] . But since the structure of your metric doesn’t have this additional metric, Pigment will again do something like [REMOVE: Client].

 

If you divide 25 535,05 / 214,50 you get around 119, so this might also be a clue on the size of this additional list.

 

As a rule of thumb, as @Nathan stated: when in doubt, try your results in the formula playground and look at the structure in auto mode. If your Renew after current month ? metric indeed has an additional dimension, try doing Renew after current month ?[REMOVE: Client] (or whatever dimension / combination it is), and once the structure matches what you expect, you can paste your formula in your metric again - where you should have the correct results.

Reply