Skip to main content
Solved

need help understanding a formula

  • June 16, 2025
  • 4 replies
  • 60 views

Forum|alt.badge.img+5

Can someone please help me understand this formula :

('FX_01_Calc_FX Rates Staging'[ADD constant: Version] [ by sum  : Conversion."Group"]+ 1[ADD constant: Month, Currency, Version] [by sum : Conversion."Local"])[filter:'Set_Filter_Version Window']

How is the second part of this formula starting from ‘+1’ ensuring that the data goes to the dropdown item “Local” in the conversion list? 

Best answer by Stef

Hi ​@tjain02 ,

I see. Imagine you would have three separate metrics:

Metric A:
'FX_01_Calc_FX Rates Staging'[ADD constant: Version] [ by sum  : Conversion."Group"]

Metric B:
1[ADD constant: Month, Currency, Version] [by sum : Conversion."Local"]

Metric C:

(A+B) [filter:'Set_Filter_Version Window']

In metric C you would get the same result as in your combined formula. The + operator indeed sums the values but because they are both allocated by another item of the Conversion dimension you would never see the sum unless you’re looking at “Local” + “Group” (which does not make sense). 

Hope this helps,

4 replies

Stef
Employee
Forum|alt.badge.img+12
  • Employee
  • June 16, 2025

Hi ​@tjain02 ,

The second part will be mapped to the “Local” item in the Conversion dimension because of this piece of formula: 
 

[by sum : Conversion."Local"]

Hope this helps, 


Forum|alt.badge.img+5
  • Author
  • Author
  • June 17, 2025

Hey ​@Stef ,

My confusion is regarding the ‘+” operator. Wouldn’t that be used for summing values? Here in this context it seems it is being used to separate values based of different list items


Stef
Employee
Forum|alt.badge.img+12
  • Employee
  • Answer
  • June 17, 2025

Hi ​@tjain02 ,

I see. Imagine you would have three separate metrics:

Metric A:
'FX_01_Calc_FX Rates Staging'[ADD constant: Version] [ by sum  : Conversion."Group"]

Metric B:
1[ADD constant: Month, Currency, Version] [by sum : Conversion."Local"]

Metric C:

(A+B) [filter:'Set_Filter_Version Window']

In metric C you would get the same result as in your combined formula. The + operator indeed sums the values but because they are both allocated by another item of the Conversion dimension you would never see the sum unless you’re looking at “Local” + “Group” (which does not make sense). 

Hope this helps,


Forum|alt.badge.img+5
  • Author
  • Author
  • June 17, 2025

Hey ​@Stef , thanks for explaining it in this way. Makes sense now.