I am looking to create a bar chart in NeoDash using Cypher which gives the percentage of each response (r.Response), (Categories are - Accepted, Declined etc.), a property of the [r:RE_INVITED_TO] relationship, broken down by Gender (p.Gender). Here is my current code -
MATCH (p:REPerson)-[r:RE_INVITED_TO]-(:REEvent)
WITH SUM(toInteger(r.Response)) As total
MATCH (p:REPerson)-[r:RE_INVITED_TO]-(:REEvent)
RETURN p.Gender, count(p), 100.0 * SUM(r.Response) / total
Currently it gives me the error message
sum() can only handle numerical values, duration, and null. Got String("Accepted")
How would I fix this?