Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
SUM( { <FIELD_A = FIELD_B> } METRIC)
I want to Sum all values of METRIC where values of FIELD_A match the values of FIELD_B.
Hi,
One alternative to Fernando`s solution is the p() function.
SUM( { <FIELD_A =p(FIELD_B)}> } METRIC)
But if you want to make a test row by row, I suggest you create a flag in script.
LOAD FIELD_A, FIELD_B,
IF( FIELD_A = FIELD_B, 1,0) AS FLAG_AB
...
Then, your set analysis would be
SUM( { <FLAG_AB = {1}}> } METRIC)
Hope this helps,
Erich
is wrong because the fields FIELD_B has many different values.
you can try this:
SUM( { <FIELD_A = {$(=Concat(FIELD_B,',')}> } METRIC)
Best regards.
Tonial.
Hi,
Did you checked is there is any values avilable in both the columns?
-Jai
Hi,
Create one Variable vFIELD= '=concat(Chr(39) &FIELD_B&Chr(39),',')'
SUM( { <FIELD_A = {'$(vFIELD)'}>}METRIC) .u try This method .
Hi,
One alternative to Fernando`s solution is the p() function.
SUM( { <FIELD_A =p(FIELD_B)}> } METRIC)
But if you want to make a test row by row, I suggest you create a flag in script.
LOAD FIELD_A, FIELD_B,
IF( FIELD_A = FIELD_B, 1,0) AS FLAG_AB
...
Then, your set analysis would be
SUM( { <FLAG_AB = {1}}> } METRIC)
Hope this helps,
Erich