We recently updated to the new UI, and one complaint that I’m receiving from users in my organization is that there is no longer a way to filter to distinct values. It seems that the previous way of applying a metric only gives you the option to see the number of distinct values, but we need to be able to see the actual distinct values themselves.
Am I missing something in the UI? or should I open a new feature request?
I don’t remember SELECT DISTINCT ever being an option, but maybe I missed something.
All I’ve ever done is group by the columns I need. Makes it distinct.
Yeah, the way to do it in the old query builder UI was a sort of goofy side effect of the fact that it let you add a grouping when viewing raw data, which was pretty nonsensical. Much to my chagrin, it turns out that weird behavior is actually still possible in the “Custom Question” notebook view.
There is also the ability to drill down from the “Browse Data -> Learn About Our Data” screen to the table and then column you’re interested in, then clicking on “view all values.” This flow sucks, though, and I agree that there should be a far simpler, intentional way to look up these values while in the simple query mode. I’ll open a new feature request issue to that effect and post it here.
@maz Thanks for following up on this. We’ll probably try to use the custom question behavior until it’s patched or a fix is present. The challenge for us with the “Browse Data -> Learn About Our Data” is that we have a few tables that are quite large (multi-billion rows) that our users want to query very specific things from. I realize this is probably something solved by data model changes, but in the meantime this is something I get questions on from our internal users quite a bit.
You kind of can do that by using the aggregation UI without actually aggregating (only choose the field by which you want to group and leave the aggregation function empty). That is equivalent to doing only
GROUP BY without any aggregation function (which has the same effect as
DISTINCT - at least on MySQL, possibly only with the “full group-by” mode disabled). Then you’ll have to join the same table or something.
I think it’s quite a common use case (I stumbled across this post by googling for this very issue), so I would love to see this possible in the UI. The issue about this is here: https://github.com/metabase/metabase/issues/805, I suggest we vote for it (I’ve done so).
Thank You very much
this was very helpful
Any update on this item? I'd love to see this functionality too. I've upvoted the git issue.