Custom column appering before AND after Summarize


Not sure if this is a bug or a feature but whenever I want to add a custom column it usually appears BEFORE Summarize which unfortunately won't allow me to use aggregated fields in my custom columns BUT there was one case when I somehow managed to add custom columns AFTER Summarize which turned out to be very useful since I could reuse those fields in the custom columns (can't recreate the steps now). Weirdly enough, it also allowed me to add a second custom column field before Summarize... I really need to figure out how this works and why it won't let me add custom columns after I aggrerage my data most of the time but sometimes it does. I'm so confused lol so any help would be appreciated.

Hi! so the order in which you do things in the notebook editor matters, as Metabase builds the query based on this. That's why you can add "custom columns" before and after the summarize section, but the one that's before the summarize will take the fields from the table, while the one after will take the summarized fields

I understand that. But where do I click to add a custom column after the summarize part? It only allows me to add one before...

Guys, I really need your help. How do I add a custom column after Summarize? It did work once for me but I can't seem to make it work again :frowning:

Please consider that then help in this forum is best effort. Which dw are you using?

What is dw?

So I figured it out by myself. Metabase requires you to specify the column(s) to summarize by before you can add custom columns after it... Which is a bit weird (what if I just want to calculate distinct values in the whole table without GROUP BY) but at least it works for me now.