Doug Creighton
07/22/2025, 5:04 PMYvonne Changamuka
07/22/2025, 11:27 PMDoug Creighton
07/22/2025, 11:52 PMDoug Creighton
07/22/2025, 11:53 PMDoug Creighton
07/23/2025, 2:10 PMJoseph Heun
07/23/2025, 2:48 PMTEST-NONE metric is counting Userids id where the “Utilized % - Spark Case Notes” equals 0. This utilization metric is grouped by user ID, but when you remove local_user_id from the visualization, the grouping level changes. That causes the count to operate over a broader grain — essentially counting multiple rows for the same user if they appear more than once in the dataset. So even if there are only 51 unique users, the count jumps when the system no longer knows to group by that ID.
GoodData MAQL doesn’t support COUNT(DISTINCT) directly, so to get accurate numbers, you need to make sure the grouping stays intact. One way to fix this is to rewrite the metric like this:
SELECT COUNT(Userids id)
BY Userids id
WHERE Utilized % - Spark Case Notes = 0
This way, each user is only counted once, regardless of how many rows they have. You can also include
Userids id in the insight and just hide the column — this forces the correct grouping without affecting the visual layout. Basically, you will want to lock the granularity by the primary key.
Could you give this a try and let us know how you get on?Doug Creighton
07/23/2025, 2:56 PMDoug Creighton
07/23/2025, 2:59 PMDoug Creighton
07/23/2025, 2:59 PMDoug Creighton
07/23/2025, 3:01 PMJoseph Heun
07/23/2025, 3:02 PMDoug Creighton
07/23/2025, 3:02 PMSELECT count({label/dim_sidd_user_ids.userids_id})
WHERE(
SELECT {metric/utilized_-_spark_case_notes}
BY {label/dim_sidd_user_ids.userids_id}
) = 0Doug Creighton
07/23/2025, 3:03 PMJoseph Heun
07/23/2025, 3:04 PMJoseph Heun
07/23/2025, 3:06 PMDoug Creighton
07/23/2025, 3:08 PMDoug Creighton
07/23/2025, 3:11 PMSELECT count({label/dim_sidd_user_ids.userids_id})
BY {label/dim_sidd_user_ids.userids_id}
WHERE(
SELECT {metric/utilized_-_spark_case_notes}
BY {label/dim_sidd_user_ids.userids_id}
) = 0Doug Creighton
07/23/2025, 3:11 PMSELECT count({label/dim_sidd_user_ids.userids_id})
BY {label/dim_sidd_user_ids.userids_id}Doug Creighton
07/23/2025, 3:45 PMSELECT COUNT(Userids id)
BY Userids id
WHERE Utilized % - Spark Case Notes = 0Doug Creighton
07/23/2025, 3:50 PMDoug Creighton
07/23/2025, 4:34 PMJoseph Heun
07/23/2025, 4:36 PMDoug Creighton
07/23/2025, 4:37 PMDoug Creighton
07/23/2025, 4:40 PMJoseph Heun
07/23/2025, 4:41 PMJoseph Heun
07/23/2025, 4:41 PMDoug Creighton
07/23/2025, 4:41 PMDoug Creighton
07/23/2025, 4:41 PMDoug Creighton
07/23/2025, 4:42 PMDoug Creighton
07/23/2025, 4:43 PMDoug Creighton
07/23/2025, 4:50 PMDoug Creighton
07/23/2025, 6:07 PMSELECT CASE WHEN `def_m_7768b660d2e0dc3e96dff8ca0d2c7d1f` THEN `m_7768b660d2e0dc3e96dff8ca0d2c7d1f` ELSE NULL END `m_1`, CASE WHEN `def_m_3f241f772f07528ad84b833f6e074664` THEN `m_3f241f772f07528ad84b833f6e074664` ELSE NULL END `m_2`, CASE WHEN `def_m_f4920fd4d062a82b008b212aaf171d29` THEN `m_f4920fd4d062a82b008b212aaf171d29` ELSE NULL END `m_3`, CASE WHEN `def_m_dbc5d9ac578be404c12420fcd3baaacd` THEN `m_dbc5d9ac578be404c12420fcd3baaacd` ELSE NULL END `m_4`
FROM (SELECT COUNT(CASE WHEN COALESCE(`t7`.`def_m_9e925cbf1091294fd907261015c6ad8a`, FALSE) AND COALESCE(`t7`.`def_m_5cce2edad1fe49c3be3c82cc4d97107f`, FALSE) AND COALESCE(CAST((`t7`.`m_9e925cbf1091294fd907261015c6ad8a`) AS DOUBLE) / NULLIF(`t7`.`m_5cce2edad1fe49c3be3c82cc4d97107f`, 0), 0.0) = 0 THEN `t2`.`a_label_dim_sidd_user_ids_local_user_id_tenant__1ba7abb141a9ba` ELSE NULL END) `m_7768b660d2e0dc3e96dff8ca0d2c7d1f`, COUNT(CASE WHEN COALESCE(`t7`.`def_m_9e925cbf1091294fd907261015c6ad8a`, FALSE) AND COALESCE(`t7`.`def_m_5cce2edad1fe49c3be3c82cc4d97107f`, FALSE) AND 0 < COALESCE(CAST((`t7`.`m_9e925cbf1091294fd907261015c6ad8a`) AS DOUBLE) / NULLIF(`t7`.`m_5cce2edad1fe49c3be3c82cc4d97107f`, 0), 0.0) AND COALESCE(CAST((`t7`.`m_9e925cbf1091294fd907261015c6ad8a`) AS DOUBLE) / NULLIF(`t7`.`m_5cce2edad1fe49c3be3c82cc4d97107f`, 0), 0.0) <= 0.5 THEN `t2`.`a_label_dim_sidd_user_ids_local_user_id_tenant__1ba7abb141a9ba` ELSE NULL END) `m_3f241f772f07528ad84b833f6e074664`, COUNT(CASE WHEN COALESCE(`t7`.`def_m_9e925cbf1091294fd907261015c6ad8a`, FALSE) AND COALESCE(`t7`.`def_m_5cce2edad1fe49c3be3c82cc4d97107f`, FALSE) AND 0.5 < COALESCE(CAST((`t7`.`m_9e925cbf1091294fd907261015c6ad8a`) AS DOUBLE) / NULLIF(`t7`.`m_5cce2edad1fe49c3be3c82cc4d97107f`, 0), 0.0) AND COALESCE(CAST((`t7`.`m_9e925cbf1091294fd907261015c6ad8a`) AS DOUBLE) / NULLIF(`t7`.`m_5cce2edad1fe49c3be3c82cc4d97107f`, 0), 0.0) <= 0.85 THEN `t2`.`a_label_dim_sidd_user_ids_local_user_id_tenant__1ba7abb141a9ba` ELSE NULL END) `m_f4920fd4d062a82b008b212aaf171d29`, COUNT(CASE WHEN COALESCE(`t7`.`def_m_9e925cbf1091294fd907261015c6ad8a`, FALSE) AND COALESCE(`t7`.`def_m_5cce2edad1fe49c3be3c82cc4d97107f`, FALSE) AND 0.85 < COALESCE(CAST((`t7`.`m_9e925cbf1091294fd907261015c6ad8a`) AS DOUBLE) / NULLIF(`t7`.`m_5cce2edad1fe49c3be3c82cc4d97107f`, 0), 0.0) THEN `t2`.`a_label_dim_sidd_user_ids_local_user_id_tenant__1ba7abb141a9ba` ELSE NULL END) `m_dbc5d9ac578be404c12420fcd3baaacd`, MAX(CASE WHEN COALESCE(`t7`.`def_m_9e925cbf1091294fd907261015c6ad8a`, FALSE) AND COALESCE(`t7`.`def_m_5cce2edad1fe49c3be3c82cc4d97107f`, FALSE) AND COALESCE(CAST((`t7`.`m_9e925cbf1091294fd907261015c6ad8a`) AS DOUBLE) / NULLIF(`t7`.`m_5cce2edad1fe49c3be3c82cc4d97107f`, 0), 0.0) = 0 THEN 0 ELSE NULL END) IS NOT NULL `def_m_7768b660d2e0dc3e96dff8ca0d2c7d1f`, MAX(CASE WHEN COALESCE(`t7`.`def_m_9e925cbf1091294fd907261015c6ad8a`, FALSE) AND COALESCE(`t7`.`def_m_5cce2edad1fe49c3be3c82cc4d97107f`, FALSE) AND 0 < COALESCE(CAST((`t7`.`m_9e925cbf1091294fd907261015c6ad8a`) AS DOUBLE) / NULLIF(`t7`.`m_5cce2edad1fe49c3be3c82cc4d97107f`, 0), 0.0) AND COALESCE(CAST((`t7`.`m_9e925cbf1091294fd907261015c6ad8a`) AS DOUBLE) / NULLIF(`t7`.`m_5cce2edad1fe49c3be3c82cc4d97107f`, 0), 0.0) <= 0.5 THEN 0 ELSE NULL END) IS NOT NULL `def_m_3f241f772f07528ad84b833f6e074664`, MAX(CASE WHEN COALESCE(`t7`.`def_m_9e925cbf1091294fd907261015c6ad8a`, FALSE) AND COALESCE(`t7`.`def_m_5cce2edad1fe49c3be3c82cc4d97107f`, FALSE) AND 0.5 < COALESCE(CAST((`t7`.`m_9e925cbf1091294fd907261015c6ad8a`) AS DOUBLE) / NULLIF(`t7`.`m_5cce2edad1fe49c3be3c82cc4d97107f`, 0), 0.0) AND COALESCE(CAST((`t7`.`m_9e925cbf1091294fd907261015c6ad8a`) AS DOUBLE) / NULLIF(`t7`.`m_5cce2edad1fe49c3be3c82cc4d97107f`, 0), 0.0) <= 0.85 THEN 0 ELSE NULL END) IS NOT NULL `def_m_f4920fd4d062a82b008b212aaf171d29`, MAX(CASE WHEN COALESCE(`t7`.`def_m_9e925cbf1091294fd907261015c6ad8a`, FALSE) AND COALESCE(`t7`.`def_m_5cce2edad1fe49c3be3c82cc4d97107f`, FALSE) AND 0.85 < COALESCE(CAST((`t7`.`m_9e925cbf1091294fd907261015c6ad8a`) AS DOUBLE) / NULLIF(`t7`.`m_5cce2edad1fe49c3be3c82cc4d97107f`, 0), 0.0) THEN 0 ELSE NULL END) IS NOT NULL `def_m_dbc5d9ac578be404c12420fcd3baaacd`
FROM (SELECT `local_user_id` `a_label_dim_sidd_user_ids_local_user_id_tenant__1ba7abb141a9ba`
FROM `gooddata_v3`.`dim_sidd_user_ids`
WHERE `wdf__tenant_id` = "sephora"
GROUP BY `local_user_id`) `t2`
LEFT JOIN (SELECT `t4`.`local_user_id` `a_label_dim_sidd_user_ids_local_user_id_tenant__1ba7abb141a9ba`, SUM(`t3`.`f__call_case_note_ended`) `m_9e925cbf1091294fd907261015c6ad8a`, SUM(`t3`.`f__call_transcription_started`) `m_5cce2edad1fe49c3be3c82cc4d97107f`, TRUE `def_m_9e925cbf1091294fd907261015c6ad8a`, TRUE `def_m_5cce2edad1fe49c3be3c82cc4d97107f`
FROM (SELECT *
FROM `gooddata_v3`.`sidd_analytic_standard_rollup_sentiment_call_cases`
WHERE `wdf__tenant_id` = "sephora") `t3`
INNER JOIN (SELECT *
FROM `gooddata_v3`.`dim_sidd_user_ids`
WHERE `wdf__tenant_id` = "sephora") `t4` ON `t3`.`wdf__tenant_id` = `t4`.`wdf__tenant_id` AND `t3`.`userids_id` = `t4`.`userids_id`
GROUP BY `t4`.`local_user_id`) `t7` ON `t2`.`a_label_dim_sidd_user_ids_local_user_id_tenant__1ba7abb141a9ba` = `t7`.`a_label_dim_sidd_user_ids_local_user_id_tenant__1ba7abb141a9ba`
GROUP BY CAST(NULL AS INTEGER)) `t10`
WHERE `t10`.`def_m_7768b660d2e0dc3e96dff8ca0d2c7d1f` OR `t10`.`def_m_3f241f772f07528ad84b833f6e074664` OR `t10`.`def_m_f4920fd4d062a82b008b212aaf171d29` OR `t10`.`def_m_dbc5d9ac578be404c12420fcd3baaacd`;
with date filter
Its now 130 Lines (can't post the entire thing its too longDoug Creighton
07/23/2025, 6:08 PMDoug Creighton
07/23/2025, 6:19 PMSELECT count(DISTINCT
CASE
WHEN COALESCE(`t42`.`def_m_f112d255586fa660a8bc3086a761636e`, false)
AND COALESCE(`t42`.`def_m_7ca863ba6e2fee4f7a9018deaa0be172`, false)
AND COALESCE(cast((`t42`.`m_f112d255586fa660a8bc3086a761636e`) AS DOUBLE) / NULLIF(`t42`.`m_7ca863ba6e2fee4f7a9018deaa0be172`, 0), 0.0) = 0 THEN `t36`.`local_user_id`
ELSE NULL
END) `m_3ce18810f3467387979f344ffcf3eb11`,
count(DISTINCT
CASE
WHEN COALESCE(`t42`.`def_m_f112d255586fa660a8bc3086a761636e`, false)
AND COALESCE(`t42`.`def_m_7ca863ba6e2fee4f7a9018deaa0be172`, false)
AND 0 < COALESCE(cast((`t42`.`m_f112d255586fa660a8bc3086a761636e`) AS DOUBLE) / NULLIF(`t42`.`m_7ca863ba6e2fee4f7a9018deaa0be172`, 0), 0.0)
AND COALESCE(cast((`t42`.`m_f112d255586fa660a8bc3086a761636e`) AS DOUBLE) / NULLIF(`t42`.`m_7ca863ba6e2fee4f7a9018deaa0be172`, 0), 0.0) <= 0.5 THEN `t36`.`local_user_id`
ELSE NULL
END) `m_a4291d22c663dc39a4c453ff1058b4bd`,
count(DISTINCT
CASE
WHEN COALESCE(`t42`.`def_m_f112d255586fa660a8bc3086a761636e`, false)
AND COALESCE(`t42`.`def_m_7ca863ba6e2fee4f7a9018deaa0be172`, false)
AND 0.5 < COALESCE(cast((`t42`.`m_f112d255586fa660a8bc3086a761636e`) AS DOUBLE) / NULLIF(`t42`.`m_7ca863ba6e2fee4f7a9018deaa0be172`, 0), 0.0)
AND COALESCE(cast((`t42`.`m_f112d255586fa660a8bc3086a761636e`) AS DOUBLE) / NULLIF(`t42`.`m_7ca863ba6e2fee4f7a9018deaa0be172`, 0), 0.0) <= 0.85 THEN `t36`.`local_user_id`
ELSE NULL
END) `m_f3a540aadd9c2ac0dd32d316b7f29f17`,
count(DISTINCT
CASE
WHEN COALESCE(`t42`.`def_m_f112d255586fa660a8bc3086a761636e`, false)
AND COALESCE(`t42`.`def_m_7ca863ba6e2fee4f7a9018deaa0be172`, false)
AND 0.85 < COALESCE(cast((`t42`.`m_f112d255586fa660a8bc3086a761636e`) AS DOUBLE) / NULLIF(`t42`.`m_7ca863ba6e2fee4f7a9018deaa0be172`, 0), 0.0) THEN `t36`.`local_user_id`
ELSE NULL
END) `m_cd0140b2366a052339fe33e775022b31`
FROM (
SELECT *
FROM laivly.`gooddata_v3`.`sidd_analytic_standard_line_call_topic`
WHERE `wdf__tenant_id` = "sephora") `t35`
INNER JOIN
(
SELECT *
FROM laivly.`gooddata_v3`.`dim_sidd_user_ids`
WHERE `wdf__tenant_id` = "sephora") `t36`
ON `t35`.`wdf__tenant_id` = `t36`.`wdf__tenant_id`
AND `t35`.`userids_id` = `t36`.`userids_id`
LEFT JOIN
(
SELECT `t38`.`local_user_id` `a_label_dim_sidd_user_ids_local_user_id_tenant__1ba7abb141a9ba`,
sum(`t37`.`f__call_case_note_ended`) `m_f112d255586fa660a8bc3086a761636e`,
sum(`t37`.`f__call_transcription_started`) `m_7ca863ba6e2fee4f7a9018deaa0be172`,
true `def_m_f112d255586fa660a8bc3086a761636e`,
true `def_m_7ca863ba6e2fee4f7a9018deaa0be172`
FROM (
SELECT *
FROM laivly.`gooddata_v3`.`sidd_analytic_standard_rollup_sentiment_call_cases`
WHERE `wdf__tenant_id` = "sephora") `t37`
INNER JOIN
(
SELECT *
FROM laivly.`gooddata_v3`.`dim_sidd_user_ids`
WHERE `wdf__tenant_id` = "sephora") `t38`
ON `t37`.`wdf__tenant_id` = `t38`.`wdf__tenant_id`
AND `t37`.`userids_id` = `t38`.`userids_id`
WHERE `t37`.`case_opened` >= convert_timezone("Etc/UTC", current_timezone(), to_timestamp("2025-05-07", "yyyy-MM-dd"))
AND `t37`.`case_opened` < convert_timezone("Etc/UTC", current_timezone(), (to_timestamp("2025-05-07", "yyyy-MM-dd") + (interval '1 day')))
GROUP BY `t38`.`local_user_id`) `t42`
ON `t36`.`local_user_id` = `t42`.`a_label_dim_sidd_user_ids_local_user_id_tenant__1ba7abb141a9ba`
WHERE `t35`.`case_opened` >= convert_timezone("Etc/UTC", current_timezone(), to_timestamp("2025-05-07", "yyyy-MM-dd"))
AND `t35`.`case_opened` < convert_timezone("Etc/UTC", current_timezone(), (to_timestamp("2025-05-07", "yyyy-MM-dd") + (interval '1 day')))
AND (
COALESCE(`t42`.`def_m_f112d255586fa660a8bc3086a761636e`, false)
AND COALESCE(`t42`.`def_m_7ca863ba6e2fee4f7a9018deaa0be172`, false)
AND COALESCE(cast((`t42`.`m_f112d255586fa660a8bc3086a761636e`) AS DOUBLE) / NULLIF(`t42`.`m_7ca863ba6e2fee4f7a9018deaa0be172`, 0), 0.0) = 0
OR COALESCE(`t42`.`def_m_f112d255586fa660a8bc3086a761636e`, false)
AND COALESCE(`t42`.`def_m_7ca863ba6e2fee4f7a9018deaa0be172`, false)
AND 0 < COALESCE(cast((`t42`.`m_f112d255586fa660a8bc3086a761636e`) AS DOUBLE) / NULLIF(`t42`.`m_7ca863ba6e2fee4f7a9018deaa0be172`, 0), 0.0)
AND COALESCE(cast((`t42`.`m_f112d255586fa660a8bc3086a761636e`) AS DOUBLE) / NULLIF(`t42`.`m_7ca863ba6e2fee4f7a9018deaa0be172`, 0), 0.0) <= 0.5
OR COALESCE(`t42`.`def_m_f112d255586fa660a8bc3086a761636e`, false)
AND COALESCE(`t42`.`def_m_7ca863ba6e2fee4f7a9018deaa0be172`, false)
AND 0.5 < COALESCE(cast((`t42`.`m_f112d255586fa660a8bc3086a761636e`) AS DOUBLE) / NULLIF(`t42`.`m_7ca863ba6e2fee4f7a9018deaa0be172`, 0), 0.0)
AND COALESCE(cast((`t42`.`m_f112d255586fa660a8bc3086a761636e`) AS DOUBLE) / NULLIF(`t42`.`m_7ca863ba6e2fee4f7a9018deaa0be172`, 0), 0.0) <= 0.85
OR COALESCE(`t42`.`def_m_f112d255586fa660a8bc3086a761636e`, false)
AND COALESCE(`t42`.`def_m_7ca863ba6e2fee4f7a9018deaa0be172`, false)
AND 0.85 < COALESCE(cast((`t42`.`m_f112d255586fa660a8bc3086a761636e`) AS DOUBLE) / NULLIF(`t42`.`m_7ca863ba6e2fee4f7a9018deaa0be172`, 0), 0.0))
GROUP BY cast(NULL AS integer)Doug Creighton
07/23/2025, 6:22 PMDoug Creighton
07/23/2025, 7:18 PMJoseph Heun
07/24/2025, 7:39 AMDoug Creighton
07/25/2025, 3:26 PMDoug Creighton
07/25/2025, 3:26 PMDoug Creighton
07/25/2025, 8:12 PMDaniel Stourac
07/25/2025, 9:12 PMJoseph Heun
07/28/2025, 2:11 PMDoug Creighton
07/28/2025, 2:36 PMDoug Creighton
07/28/2025, 2:37 PMJoseph Heun
07/28/2025, 2:44 PMDoug Creighton
07/28/2025, 2:45 PMDoug Creighton
07/28/2025, 2:46 PMJoseph Heun
07/28/2025, 2:51 PMJoseph Heun
07/28/2025, 2:54 PMJoseph Heun
07/28/2025, 3:05 PMDoug Creighton
07/28/2025, 3:11 PMDoug Creighton
07/28/2025, 3:14 PMJoseph Heun
07/29/2025, 12:35 PMJoseph Heun
07/30/2025, 10:59 AMDoug Creighton
07/30/2025, 9:15 PMDoug Creighton
07/30/2025, 9:17 PMDoug Creighton
07/30/2025, 9:26 PMSELECT count(Userids id, Userids id) WHERE Utilized % - Spark Case Notes = 0Daniel Stourac
07/31/2025, 3:40 PMDoug Creighton
07/31/2025, 3:46 PMDoug Creighton
07/31/2025, 3:50 PMDoug Creighton
07/31/2025, 3:52 PMDoug Creighton
07/31/2025, 3:55 PMSELECT count({label/dim_sidd_user_ids.userids_id}) <- counting on the dimension table
WHERE(
SELECT {metric/utilized_-_spark_case_notes}
BY {label/dim_sidd_user_ids.userids_id} <- this and local_user_id are unique on the wdf filter so gives the same answer
) = 0
What is working - but its a workaround that creates a bit of a headache. We shouldn't have to add the dimension to a fact table
SELECT count({label/case_userids}) <- counting on the fact table
WHERE(
SELECT {metric/utilized_-_spark_case_notes}
BY {label/dim_sidd_user_ids.local_user_id} <- this and local_user_id are unique on the wdf filter so gives the same answer
) = 0
What Joseph said should work (I personally don't understand the logic here) - this one creates errors in the filters
SELECT count({label/dim_sidd_user_ids.userids_id}, {label/dim_sidd_user_ids.userids_id})
WHERE {metric/utilized_-_spark_case_notes}
= 0Daniel Stourac
07/31/2025, 4:04 PMtest - None is the one that should work but gives wrong numbers?
None and Test - None 3 are the ones that are showing correct number but are confusing?Daniel Stourac
07/31/2025, 4:13 PMtest - None is the one that calculates incorrectly,
None is the one that works but is confusing (headache)
Test - Should be 5 May is the one that Joe suggested and the filters object to it
Right?Doug Creighton
07/31/2025, 7:32 PMDoug Creighton
07/31/2025, 7:32 PMDoug Creighton
07/31/2025, 7:34 PMDaniel Stourac
08/04/2025, 3:02 PMDoug Creighton
08/04/2025, 3:12 PMDoug Creighton
08/04/2025, 3:14 PMDoug Creighton
08/04/2025, 3:14 PMDoug Creighton
08/04/2025, 3:15 PMDoug Creighton
08/04/2025, 3:16 PMDoug Creighton
08/04/2025, 3:16 PMDoug Creighton
08/05/2025, 2:59 PMDoug Creighton
08/05/2025, 3:02 PMDaniel Stourac
08/05/2025, 3:03 PMDoug Creighton
08/05/2025, 3:04 PMMauricio Cabezas
08/07/2025, 7:40 PMSELECT count({label/case_userids})
WHERE(
SELECT {metric/utilized_-_spark_case_notes}
BY {label/dim_sidd_user_ids.local_user_id}
) = 0
In this metric, you also have another metric called '`Utilized % - Spark Case Notes`':
SELECT IFNULL(SELECT SUM({fact/sidd_analytic_standard_rollup_sentiment_call_cases.call_case_note_ended})/
SUM({fact/sidd_analytic_standard_rollup_sentiment_call_cases.call_transcription_started}),0)
This metric relies on two facts from the dataset: sidd_analytic_standard_rollup_sentiment_call_cases.
In your case, because the Logical Data Model is quite complex and the userids_id appears in multiple fact tables/datasets, you need to use the ``USING`` clause to specify which dataset you are referring to. In this case, I believe you want to use the same dataset as the working metric, which is sidd_analytic_standard_rollup_sentiment_call_cases (please, refer the example provided in the documentation)
So, by updating the metric as follow:
SELECT count({label/dim_sidd_user_ids.userids_id})
WHERE(
SELECT {metric/utilized_-_spark_case_notes}
BY {label/dim_sidd_user_ids.userids_id}
) = 0
USING {dataset/sidd_analytic_standard_rollup_sentiment_call_cases}
You will get a result of 5 for May 7th.
To answer your question, with this change, all the unions and joins in the SQL query will be eliminated, simplifying it significantly. Previously, the other unions and joins were necessary because userids_id is present in many fact tables.
Please, give it a try and let us know.Doug Creighton
08/12/2025, 3:05 PM