Question
Why isn’t my calculated attribute or metric pulling up the right values? I added a metric to my formula but the information is incorrect.
Answer
When writing formulas in Explore, keep in mind that Explore reads the strings in your formula. A string is a sequence of text and characters that is related to a value. In Explore, all string searches are case-sensitive.
When adding metrics or attributes to a formula, the formula field relies on exact matches and complete strings of text. Verify the following details about your formula:
- Check your spelling when adding metrics and attributes to make sure the string of text is an exact match.
- Verify that you are using the appropriate dataset that contains your desired metric.
- Check the capitalization requirements when creating your own custom formulas.
Example
For example, let's review the attribute Ticket status. This attribute is computed from Ticket status - Unsorted and has the string values New, Open, Pending, Hold, Solved, Closed, and NULL to choose from. If you have custom ticket statuses enabled there may be more options. Because all string searches are case-sensitive, the two formula examples below will return different results because of a difference in capitalization.
IF ([Ticket status - Unsorted]= "Open") THEN [Ticket ID] ENDIF
IF ([Ticket status - Unsorted]= "open") THEN [Ticket ID] ENDIF