I am working on 2 different bar charts, which are powered with similar data ( same schema ). And in both the charts, sum() summarizations are done one couple of custom made columns (verified that the columns are integers) and no group by conditions are used.
One chart displays a bar graph with group by condition as empty(), the other chart fails to display a bar graph due to missing group by condition
Need help to understand why this is happening and what can be done here.
What database are you querying? I’m guessing MongoDB?
What version of Metabase?
What version of Metabase?
1.55.7 version of metabase
From your description, it sounds like there’s a bug in the query processor, it’s not emitting the correct query. You more or less have to use the $group aggregation stage to use aggregation functions. Metabase usually emits this as a $group with ‘_id: null’ as the group by condition.
First, since you are running a paid version of Metabase, you have access to direct support. Second, Metabase 55 is rather old, especially when dealing with MongoDB. You might see if you can get access to a Metabase 56 test instance so you can check if the bug still exists, or see if support can do that for you.
Add some filtering to guard against any input documents having non-numeric values in your calculations, and to guard against any values that might result in a divide by zero or some other non-numeric result. It seems some aggregation expressions don’t react well to erroneous input.
Exactly. I figured that we do need a group by aggregator when trying to summarize using the query builder. Even I was suprised when it was working for one of the charts. And when I created the next chart, it doesn’t. 
There’s no non-numeric values and division operations involved, I created few custom conditional columns which only have 0’s and 1’s. At the end, I’m doing sum() operation on top of them to show as a bar graph.
We do have direct support. Usually, we only reach out to them when we have urgent requirements, but yeah, I’ll try reaching out to them.