I have a table with multiple metrics and would like to create a filter only for the Event Count metric but when I do, it alters the other metrics. For example I need to create a filter where Event Name=form_submit and that would be the Event Count number and I need all of the metrics to not use that filter. I am a novice user and will need step by step instructions please.
Thank you!!
Hey there!
Generally speaking, a filter will affect the entire chart. So, one way you can work around this is by creating a new chart with Event Count, and then filtering on that new chart.
If you want a filter to just affect one metric, you'll need to edit the metric definition. Or, to avoid altering others' work, create a new calculated field. If you wanted this to have a static filter of Event Name=form_submit, you could create a new count field with syntax like this: COUNT(IF("Event Name"="form_submit",1,null))
Hey Sam,
Sorry for being late to this reply, but you're solution would actually not work for the original request. The reason your formula would not work is because the syntax of counting where the event name is "form_submit" will only ever return 1, rather than what they want, the event count.
The original problem with the request is that they want to combine a dimension (event name) and a metric (event count) but Looker Studio does not have an easy way to create a field like this. I'm struggling with this problem as well, and continuing to work towards a solution.
Good catch - my code would only ever return 1 or null. I think if we changed it to a SUM it would be closer to what I initially intended.
SUM(IF("Event Name"="form_submit",1,null))
But it sounds like I might be missing the original problem entirely, or at least not addressing your version of the problem. How are you seeking to combine your dimension and metric?
To be honest this is inherently a limitation of Looker studio. My solution was a bit more complicated but I essentially grouped the data in BigQuery by date, Event Name, and Event Count which allows me to create individualized metrics as per the original request.
Even if you use the SUM function, the issue will be the same because you don't have an event count to join. If you're only using Looker Studio, you can try blending the data together by date if they are separated to create a metric that references both, although that's slightly complicated as its a generic key so you could concatenate the date and event name.