Raffaella Gozzini
04/14/2025, 9:19 AMRaffaella Gozzini
04/14/2025, 12:28 PMMoises Morales
04/14/2025, 2:32 PMRaffaella Gozzini
04/14/2025, 2:33 PMRaffaella Gozzini
04/14/2025, 2:43 PMMoises Morales
04/16/2025, 12:22 PM"a_label_users_first_name_examplecompanya_ad4d8af28c176c" AS "a_label_users_first_name_examplecompanya_47481990ba9b43", "a_label_users_deactivated_examplecompanya_0c7d1a356fce43" AS "a_label_users_deactivated_examplecompanya_20dfbc5d517d00", "m_30d3583f0da6ba600378ab9e912ec9a8" AS "m_1"
FROM (SELECT "users"."deactivated" AS "a_label_users_deactivated_examplecompanya_0c7d1a356fce43", "users"."first_name" AS "a_label_users_first_name_examplecompanya_ad4d8af28c176c", SUM(1) AS "m_30d3583f0da6ba600378ab9e912ec9a8", TRUE AS "def_m_30d3583f0da6ba600378ab9e912ec9a8"
FROM "examplecompanya"."group_users"
INNER JOIN "examplecompanya"."users" ON "group_users"."user_id" = "users"."id"
GROUP BY "users"."deactivated", "users"."first_name") AS "t1"
WHERE "t1"."def_m_30d3583f0da6ba600378ab9e912ec9a8";
The resulting query in my workspace is:
"a_label_users_first_name_ecba7319c43240d1bf3620_fb4fa2bbf7c8c7" AS "a_label_users_first_name_ecba7319c43240d1bf3620_e722f8906db4be", "a_label_deactivated_ecba7319c43240d1bf3620e9ff4_80551a74519b00" AS "a_label_deactivated_ecba7319c43240d1bf3620e9ff4_58dbf30a94b1f6", "m_e10a7b576509b938b8ce9f20ce15cf0a" AS "m_1"
FROM (SELECT "deactivated" AS "a_label_deactivated_ecba7319c43240d1bf3620e9ff4_80551a74519b00", "first_name" AS "a_label_users_first_name_ecba7319c43240d1bf3620_fb4fa2bbf7c8c7", SUM(1) AS "m_e10a7b576509b938b8ce9f20ce15cf0a", TRUE AS "def_m_e10a7b576509b938b8ce9f20ce15cf0a"
FROM "examplecompanya"."users"
GROUP BY "deactivated", "first_name") AS "t1"
WHERE "def_m_e10a7b576509b938b8ce9f20ce15cf0a";
Query 1 filters out users who are not present in the group_users
table, due to the INNER JOIN
. If there are deactivated users who are not associated with any group, they will:
• Not show up in Query 1 (because the inner join filters them out)
• Still appear in Query 2 (because it pulls directly from users
)
Testing this further, I modified the LDM in my workspace, and included the group_users table (see screenshot).
This time with 1:N connections and the values are now appearing (see screenshot).
New query:
SELECT "a_label_users_first_name_ecba7319c43240d1bf3620_fb4fa2bbf7c8c7" AS "a_label_users_first_name_ecba7319c43240d1bf3620_e722f8906db4be", "a_label_deactivated_ecba7319c43240d1bf3620e9ff4_80551a74519b00" AS "a_label_deactivated_ecba7319c43240d1bf3620e9ff4_58dbf30a94b1f6", "m_476a2328a398bbcff95b8b3405d6b451" AS "m_1"
FROM (SELECT "deactivated" AS "a_label_deactivated_ecba7319c43240d1bf3620e9ff4_80551a74519b00", "first_name" AS "a_label_users_first_name_ecba7319c43240d1bf3620_fb4fa2bbf7c8c7", SUM(1) AS "m_476a2328a398bbcff95b8b3405d6b451", TRUE AS "def_m_476a2328a398bbcff95b8b3405d6b451"
FROM "examplecompanya"."users"
GROUP BY "deactivated", "first_name") AS "t1"
WHERE "def_m_476a2328a398bbcff95b8b3405d6b451";
Could you please review the connections for the "Users" dataset in the "examplecompanya" and check whether it's needed to use M:N?Raffaella Gozzini
04/16/2025, 3:14 PMMoises Morales
04/16/2025, 3:33 PMRaffaella Gozzini
04/17/2025, 8:43 AMRaffaella Gozzini
04/22/2025, 4:17 PMMoises Morales
04/22/2025, 6:57 PM"true"
. This will force those attribute elements to appear in the insight. I’ve shared a test report demonstrating this behavior in your DM.
Additionally, you may want to ensure that the IDs in the group_users table are associated with the "true"
values. This can prevent those records from being filtered out by the INNER JOIN.Raffaella Gozzini
04/29/2025, 3:01 PMMoises Morales
05/02/2025, 7:13 AM