Can you please help me with dividing the count of rows from two different tables?
If the two tables have a unique key (like an ID), then use Custom Expressions like this:
Distinct([TableA_ID]) / Distinct([TableB_ID])
Thanks for the reply. But I also need a date filter to work as well for it.
@Abhimanyu92 So why wouldn't that work?
Post "Diagnostic Info" from Admin > Troubleshooting.
Post a screenshot of what you are doing and which problem you're having.
@flamber I actually want to divide the count of rows at a specific time from Customer and trialuser table.
@Abhimanyu92 Well that will not work, since it would match. You'll need to use the Primary Key of each table.
And just write the field you are trying to use, it will show an autocomplete.
@flamber (Beaconstac ID) That's the primary key for each table and you asked me to use an expression like this Distinct([TableA_ID]) / Distinct([TableB_ID]).
Can you help what should be the exact custom expression be?
@Abhimanyu92 Start typing the following manually
Distinct(B and it will show a suggestion.
I don't have your data - you'll have to figure out exactly what to write yourself.
@flamber Yes, I get that. But these are 2 different tables. It gives me an error when I write that expression with an underscore.
@Abhimanyu92 It was an example. Again, I don't have your data, so I can only provide examples.
Read this: https://www.metabase.com/docs/latest/users-guide/expressions.html#referencing-other-columns
@flamber Sure, thanks for the help. I will try to figure that out.