I am struggling to accomplish the count of unique ...
# gooddata-cloud
I am struggling to accomplish the count of unique users that did an action The data is like this Interaction id user Click Action 1 <- (1 if clicked, 0 if not clicked) date A user can be on many interactions. I want to count the amount of unique users who clicked action 1 at least one time today What I did so far was built a metric like such
Copy code
SELECT COUNT( {label/user_id})
WHERE {fact/click_action_1}=1
Then I added the date = Today metric on the 'analyze' section As it is morning I should be getting 0 users but I'm getting 100. In SQL, this works fine. Suggestions on how to solve?
Hi Doug, your metric looks to be correct - It should look like this:
Copy code
SELECT COUNT ({label/user_id}) WHERE {fact/click_action_1}= 1
So the metric looks good, so it might be related to the date = Today filter you have applied. Perhaps you’re using the UTC timezone? https://www.gooddata.com/developers/cloud-native/doc/cloud/customize-appearance/manage-timezones/
Maybe, not sure