Example Structure of How to Use AND - Zendesk Explore Calculated Attribute
Example Structure of How to Use AND
Support - Updates HistoryCalculated Attribute
Shows how to require multiple conditions to be true at the same time.
Business value & use cases
Teaches how to narrow logic so only records matching all specified conditions are included. Useful for creating precise categories in reports. Acts as a template you can adapt to your own fields and values.
Dataset and dependencies
- Dataset: Support - Updates History (syntax applies to any dataset)
- Type: Calculated Attribute
- Dependencies: None (standalone attribute)
The code
Unlock to view full code
Not sure how to work with the code? Check our getting started guides.
Implementation steps
- Go to Explore > Report Builder > Support - Updates History Dataset > Start Report.
- Select the Calculator icon for Calculations.
- Choose Standard calculated attribute.
- Paste in the code above.
- Replace the field names and values with those relevant to your reporting needs.
- Validate and save.
Validation tips
- Test with sample tickets that meet both conditions to confirm they are grouped correctly.
- Spot-check tickets that meet only one of the conditions to ensure they are excluded.
- Add Ticket ID as a filter via the UI for quick spot checks.
- Expand gradually by adding more conditions if needed.
Caveats and considerations
The AND operator only applies when every condition is satisfied. Field names and values must match exactly as they appear in Zendesk. Start with simple AND statements before chaining more together, so any errors are easy to isolate.
Example chart
Example report grouping P1 incidents versus other tickets
Related metrics / attributes
Example Structure of How to Use IF, AND, OR, THEN and ELSE
Example Structure of How to Use IF, THEN and ENDIF
Example Structure of How to Use OR
Now share real-time data with your team
Give agents a real-time view of key data from all your tools to help them win the day.