I can't seem to find why the calculation within my calculated field isn't providing the correct output.
SUM(CASE
WHEN CONTAINS_TEXT(Groups,"27797")
AND NOT CONTAINS_TEXT(Groups,"6175")
AND NOT CONTAINS_TEXT(Groups,"3929")
AND NOT CONTAINS_TEXT(Groups,"2269")
THEN _Sale
ELSE NULL
END)/SUM(Total Registrations)
Note: Below is CASE statement for "Total Registrations" field.
CASE
WHEN CONTAINS_TEXT(Groups,"27797") THEN 1
ELSE 0
END
When the CASE statement is processed separately it results in the correct value which is $1,000,000. "Total Registrations" is also a calculated field which when run by itself results in the correct value of 1,386. If those are divided then the value should come out to $721.5. However, the calculated field as shown above comes out to $923.52. I have no additional filters applied to either calculated field.
question from:
https://stackoverflow.com/questions/65892533/data-studio-calculated-field-calculation-not-correct 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…