I have two tables : `groups` and `messages`. To keep it simple let’s consider this :
I am able to create two series showing : the number of total groups over time (thanks to a running_total measure) and the number of messages created (with a simple count).
What I’d like is to have those two series on the same plot. I created an explore joining the two views. I’m confused because I don’t know if this is possible on the first place.
While it visually looks similar, values are not the same.
Should it be possible to make it work ? Is there a looker feature I’m missing here ?
Solved! Go to Solution.
You would need to use a calendar table to make the dates agnostic. Right now you can either visualise it by group creation month or message creation month but in order to isolate them both.
You have some options:
You would need to use a calendar table to make the dates agnostic. Right now you can either visualise it by group creation month or message creation month but in order to isolate them both.
You have some options:
I guess you’re right : I should use a calendar table and JOIN my resources tables to this table in the explore.
I eventually found and implemented another solution. I created a new view : union_group_message. This view has a derived table making the UNION between my 2 tables.
SELECT
creation_date,
group_id,
TRUE AS is_group,
FALSE AS is_message,
NULL AS message_id
FROM
`groups`
UNION ALL
SELECT
creation_date,
group_id,
FALSE AS is_group,
TRUE AS is_message,
message_id
FROM
messages`;;
The issue though is that I’ll have to maintain the message table at two places. With the calendar table solution I feel that I don’t have to duplicate my views thanks to JOINs in the model.