Hi Team, I’m trying to calculate the number of new...
# gooddata-cloud
c
Hi Team, I’m trying to calculate the number of new users in GoodData. I’ve got a joined date attribute, and I want the result to change dynamically based on the selected date range. For example: • If the filter is last month, count distinct
player_id
where
joined_date
falls within that month • If the filter is this month, count distinct
player_id
where
joined_date
is after the start of the month What’s the best way to set this up in GoodData?
k
New message text here
c
Is there any MAQL like select count(player_id) where joined_date in the date filter range?
m
Hi Cathy, The simplest approach — and the one that works for your case, as mentioned — is:
Copy code
SELECT COUNT({label/player_id})
Connect the dashboard date filter to your
joined_date
dimension, and GoodData will automatically scope the count to the selected period (Last Month, This Month, etc.). No extra MAQL needed. If you want the metric to respond only to the date filter (ignoring any other dashboard filters like region or game type), you can use:
Copy code
SELECT COUNT({label/player_id}) WITHOUT PARENT FILTER EXCEPT {joined_date}
This drops all other parent filters except
joined_date
, so the count stays date-scoped regardless of what else is filtered on the dashboard. I would suggest to have a look to this documentation.