Question

CASE or IF Statements in Report Formula Fields

  • 16 April 2024
  • 1 reply
  • 18 views

I’m trying to build a dashboard that calculates what % of our delivered emails were marked as SPAM. This is critical for ensuring the deliverability of our emails and success of our programs. 

I noticed that the values for the AO Email - Spam field are Yes and No. Typically in reporting tools Yes = 1 and No = 0, so you can do a formula field that counts the number of records marked as “Yes”. In Gainsight reports, Yes and No do not seem to correspond to number values. 

The workaround would be to write a formula using either ‘CASE WHEN’ or ‘IF’ statements. However, Gainsight does not support that either. For example:

  •  CASE WHEN SPAM = Yes THEN 1 ELSE 0
  • IF(CASE = Yes, 1, 0)

1 reply

Userlevel 5
Badge +5

Hi @tfriss !
I’m not sure I understood the question, but you can count by any other value.
This is a random report using a Boolean and a pie chart


You can also configure the aliases as needed

 




 


If your use case is more complex, you can use case statements in Data Designer
Hope this helps,

Reply