How to count instances from column B using an element from column A?

Hello!
I think the title of my topic doesn't help to explain what I'm trying to do very well, so let me try to make things clear:

I joined three different tables, in which I have:

  • Table A contains a list of my users;
  • Table B contains all activities assigned to the users from Table A;
  • Table C contains an activity log done by these users from Table A.

What I need to accomplish: a table (at least I think this is the way to do it, but I'm open to suggestions) with:

  • all of the users from Table A,
  • how many activities were assigned (from Table B) to each of these users
  • how many log entries (from table C) were registrered from each of these users

Any ideas on how I summarize the data in order to get these results? I think I need to use somethink like CountIf, but I'm not sure how to do it.

Thank you very much!

Hi @casimiroperez
It all depends on your joins and your data.
But sounds like you just want to use "Number of distinct values of ..." for the IDs of each table

I think it worked! Let's say I now need to a filter for the Product ID, to count only where the review category is "good". If I add a filter to this visualization selecting the review category from the category table, will it apply only to the value coming from the Review table or will it mess everything up? (I tried it here and it seems to have worked. But I would like to check with you, just in case).

@casimiroperez Again, it depends on your joins, but if you are just doing something simple as this, then it should work fine.

1 Like

Awesome, I will check the numbers against my database just to be sure. Once again, thank you very much @flamber!