Data Studio
4.9K members online now
4.9K members online now
Ask questions about Data Studio
Guide Me
star_border
Reply

Filters with dimensions having overlapping values

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi,

 

In a user table, I also keep number of days a customer logged in last time. Then I want to have a filter to see how many customers logged in within 7 days, 30 days, and 30+ days. Something like:

 

[ ] # of users logged in within 7 days

[ ] # of users logged in within 30 days

[ ] # of users logged in within 30+ days

 

Ideally I want only one of them to be selectable, but filter at least allows that by clicking "only". When I have his as a dimension, I could make them disjoint sets. So, to get # of users logged in within 30 days, one must select the first two options. Is there a way to design the filter so that they can have overlapping value set? I mean when one selects the second option, it naturally includes the first one?

 

Thanks

Filters with dimensions having overlapping values

Explorer ✭ ✭ ✭
# 2
Explorer ✭ ✭ ✭

I don't believe this is possible at this time if you are using Analytics as a Data source unless you have a custom dimension in analytics that captures user IDs. Once the Data Studio team adds user level segments, this will be easy to do but we are stuck with session level filters until then in most cases. 

A potential alternative that might work would be to create custom dimensions for each segment rather than a single custom dimension that has multiple segments. So you would have one dimension for users who logged in within the last 7 days, another dimension for users who've logged in with the last 30 days, etc. This way, you could have overlap at the user level whereas a single Dimension with multiple segments would be session based, i.e. No overlap.  This method would undoubtedly tale up more real estate since you would probably need to add a filter for each segment instead of having just 1 filter that contains multiple, but it would probably get the job done. 

I should add a caveat here though. I have not tested this myself, so I am not 100% certain this method will work but it might be worth a shot if you do not find any other solutions. 

Filters with dimensions having overlapping values

[ Edited ]
Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi Ad A,

 

Data source is not Analytics, it is a BigQuery table (SQL table) with a schema like:

 

<customer_id, days_since_last_login, last_login_dimension>

 

When I create the table, using days_since_last_login column, I add last_login_dimension column with:

 

select field1, ..., days_since_last_login,

   case when days_since_last_login <= 7 then "within 7 days"

          when days_since_last_login <= 30 then "within 30 days"

          when days_since_last_login > 30 then "within 30+ days

          else "N/A"

   end as last_login_dimension, ...

 

Obviously when a customer logged in say 3 days, last_login_dimension will have "within 7 days" so it won't be automatically counted in "within 30 days" option.

 

Instead of having one dimension, I tried having 3 dimensions for 3 separate cases, then I get the desired counts. And I can simply create 3 filters for 3 different cases, but then each filter have two values (0/1 or False/True), whereas I want one option to be selected (for the 1 or True case). Hmm, may be I can hide the false case so user only clicks True case in individual filter but by default I think it shows both options clicked!

        

 

Filters with dimensions having overlapping values

Explorer ✭ ✭ ✭
# 4
Explorer ✭ ✭ ✭

Maybe try replacing "False" with just "" ?  Or apply a filter to the filter?

I have not tried those options either, I'm just thinking out loud. 

If you figure it out, would you mind posting your solution? I could use this functionality in some of my reports too. 

Filters with dimensions having overlapping values

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Adding a filter worked up to some point. That is, for each different case, I have different fields where I can simply filter out the False case in each. Also visually I can make their headers disappear by choosing a transparent background for header. And put all 3 filters on top of each other so that only the line with tick (True case) is visible. But had two problems. Somehow filter was not functioning, they didn't have affect on a scorecard on the same page (in the same scope). Also, when you do a selection, that re-do effect (circular arraw) shows up on the filter above, not a nice thing to see.