Mira Jill Yumul
06/12/2026, 6:03 AMWe need to create a metrics that dynamically groups barristers based on the number of years since their Bar Roll date and Date of Silk date. Group membership should update automatically when a date range filter is applied on the dashboard β i.e. seniority is calculated relative to the selected date, not today's date.
The purpose of this is to display, for any given time period, a list of barrister names within each group along with their associated activity data (total tasks, case numbers, etc.).
Grouping logic:
Group 1 : Senior silks (12+ years in silk) & Mid level silks (5 to 11 years in silk)
Barristers with a Date of Silk that was 5 or more years before the selected date
Group 2 : Junior silks (5 years and below in silk)
Barristers with a Date of Silk that was less than 5 years before the selected date.
Group 3 : Senior juniors (18+ years call) & Juniors (12-17 years call)
Barristers with no Date of Silk whose Bar Roll date was 12 or more years before the selected date
Group 4 : Middle juniors (6-11 years call)
Barristers with no Date of Silk whose Bar Roll date was between 6 and 11 years before the selected date.
Group 5 : Junior juniors (0-5 years call)
Barristers with no Date of Silk whose Bar Roll date was less than 6 years before the selected date.
Relevant date fields on the barrister profile:
- dt_call
- dt_silk
To apply, I opted to create a new dataset for the groupings, since we cannot convert metrics into attributes. However, I'm not sure if this change returns the desired result.
Could you please help check if this is feasible? Thank you so much in advance πkapa.ai
06/12/2026, 6:03 AMselected_date - dt_silk or selected_date - dt_call) cannot be derived dynamically from the dashboard filter in MAQL. This is a documented product limitation that has been raised by multiple community members. [Overlap dates]
Additionally, GoodData does not support >= / <= operators on date filters, which would otherwise be needed to express conditions like "dt_silk was 5+ years before the selected date" dynamically. [No / < filters>]
Regarding Your New Dataset Approach Creating a new dataset for groupings is a step in the right direction, but the dynamic aspect remains the challenge. A static dataset would only reflect groupings as of a fixed date (e.g., today), not relative to whatever date the user selects on the dashboard.
Practical Workarounds 1. Precompute groupings at the data source level (most robust):
Add a snapshot/period table in your database that, for each barrister and each relevant time period (e.g., month or year), pre-calculates which seniority group they belong to. GoodData can then simply filter and display that pre-flagged group attribute. This sidesteps the MAQL limitation entirely. [Precompute at source]
2. Hardcode the groupings for a fixed reference date:
Define metrics with static WHERE clauses for a fixed date. This is not dynamic and requires manual updates when the reference date changes, but is technically feasible in MAQL. [WHERE clause]
3. Submit as product feedback:
The ability to reference dashboard filter boundaries (e.g., filter.selected_date) as variables inside MAQL has been explicitly requested by other community members and GoodData support has been logging these as product feedback items. [Product feedback]
Recommendation The most scalable solution given current platform capabilities is to precompute the seniority group in your data warehouse β for example, a snapshot table with columns like barrister_id, period, seniority_group β and then build your visualizations in GoodData using that pre-calculated attribute. This would allow the dashboard date filter to scope the population to the correct period's groupings naturally.
If a fully native dynamic solution is critical, I would recommend reaching out to GoodData support to formally log this as product feedback. π 0 button π 0 button βΉοΈ Tip: Mention @kapa.ai in the thread for follow-ups.
π Our Support team monitors all messages and will jump in if needed.Mira Jill Yumul
06/12/2026, 6:04 AMvw_user definition:
SELECT
`user`.`id` AS `user_id`,
CONCAT(`user`.`first_name`,
' ',
`user`.`last_name`) AS `user_name`,
`user`.`id_user_type` AS `user_type_id`,
`user`.`dt_created_utc` AS `user_created_date`,
IF((`user`.`is_active` = 1),
'true',
'false') AS `user_is_active`,
`user`.`email` AS `user_email`,
`user`.`gender` AS `user_gender`,
`user`.`mobile` AS `user_mobile`,
`user`.`title` AS `user_title`,
`preference`.`insurance_limitation_value` AS `insurance_limitation_value`,
`preference`.`annual_invoice_target` AS `annual_invoice_target`,
`preference`.`annual_receipt_target` AS `annual_receipt_target`,
COALESCE(`preference`.`id_cps_area`, 0) AS `user_cps_area_id`,
`preference`.`dt_inn_call` AS `user_date_of_call`,
`preference`.`dt_silk` AS `user_date_of_silk`,
(CASE
WHEN
(TIMESTAMPDIFF(YEAR,
`preference`.`dt_silk`,
`user`.`dt_created_utc`) >= 5)
THEN
1
WHEN
(TIMESTAMPDIFF(YEAR,
`preference`.`dt_silk`,
`user`.`dt_created_utc`) < 5)
THEN
2
WHEN
((`preference`.`dt_silk` IS NULL)
AND (TIMESTAMPDIFF(YEAR,
`preference`.`dt_inn_call`,
`user`.`dt_created_utc`) >= 12))
THEN
3
WHEN
((`preference`.`dt_silk` IS NULL)
AND (TIMESTAMPDIFF(YEAR,
`preference`.`dt_inn_call`,
`user`.`dt_created_utc`) BETWEEN 6 AND 11))
THEN
4
WHEN
((`preference`.`dt_silk` IS NULL)
AND (TIMESTAMPDIFF(YEAR,
`preference`.`dt_inn_call`,
`user`.`dt_created_utc`) < 6))
THEN
5
ELSE 0
END) AS `barrister_seniority_group_id`
FROM
(`users` `user`
JOIN `users_preferences` `preference` ON ((`preference`.`id_user` = `user`.`id`)))
WHERE
(`user`.`is_deleted` = FALSE)
I used the user's created date for nowJoseph Heun
06/12/2026, 7:42 AMMira Jill Yumul
06/12/2026, 7:44 AMJoseph Heun
06/12/2026, 11:25 AMβ οΈ Please test this in a test/staging workspace first before applying to production. The LDM change removes an existing relationship on theThe core issue with the current view Yourdataset, which could affect any visualisations currently usingusersorbarrister_seniority_group_nameas attributes.barrister_seniority_group_id
vw_barrister_seniority_group view gives every barrister one fixed group, calculated against a static date. When a user applies a year filter on the dashboard, there's nothing to update β the group never changes.
Step 1 β Update your MySQL view
Replace vw_barrister_seniority_group to produce one row per barrister Γ year, with a single surrogate key as the grain (GoodData only supports single-attribute grains) and the seniority group calculated relative to the end of each year:
sql
SELECT
CONCAT(u.id, '_', p.period_year) AS user_seniority_period_id,
u.id AS user_id,
p.period_year AS period_year,
p.period_end_date AS period_end_date,
CASE
WHEN pref.dt_silk IS NOT NULL
AND TIMESTAMPDIFF(YEAR, pref.dt_silk, p.period_end_date) >= 5 THEN 1
WHEN pref.dt_silk IS NOT NULL
AND TIMESTAMPDIFF(YEAR, pref.dt_silk, p.period_end_date) < 5 THEN 2
WHEN pref.dt_silk IS NULL
AND TIMESTAMPDIFF(YEAR, pref.dt_inn_call, p.period_end_date) >= 12 THEN 3
WHEN pref.dt_silk IS NULL
AND TIMESTAMPDIFF(YEAR, pref.dt_inn_call, p.period_end_date) BETWEEN 6 AND 11 THEN 4
WHEN pref.dt_silk IS NULL
AND TIMESTAMPDIFF(YEAR, pref.dt_inn_call, p.period_end_date) < 6 THEN 5
ELSE 0
END AS barrister_seniority_group_id,
CASE
WHEN pref.dt_silk IS NOT NULL
AND TIMESTAMPDIFF(YEAR, pref.dt_silk, p.period_end_date) >= 5 THEN 'Silks (5+ years)'
WHEN pref.dt_silk IS NOT NULL
AND TIMESTAMPDIFF(YEAR, pref.dt_silk, p.period_end_date) < 5 THEN 'Junior Silks (under 5 years)'
WHEN pref.dt_silk IS NULL
AND TIMESTAMPDIFF(YEAR, pref.dt_inn_call, p.period_end_date) >= 12 THEN 'Senior Juniors (12+ years call)'
WHEN pref.dt_silk IS NULL
AND TIMESTAMPDIFF(YEAR, pref.dt_inn_call, p.period_end_date) BETWEEN 6 AND 11 THEN 'Middle Juniors (6-11 years call)'
WHEN pref.dt_silk IS NULL
AND TIMESTAMPDIFF(YEAR, pref.dt_inn_call, p.period_end_date) < 6 THEN 'Junior Juniors (0-5 years call)'
ELSE 'Unclassified'
END AS barrister_seniority_group_name
FROM users u
JOIN users_preferences pref ON pref.id_user = u.id
CROSS JOIN (
SELECT 2015 AS period_year, '2015-12-31' AS period_end_date UNION ALL
SELECT 2016, '2016-12-31' UNION ALL
SELECT 2017, '2017-12-31' UNION ALL
SELECT 2018, '2018-12-31' UNION ALL
SELECT 2019, '2019-12-31' UNION ALL
SELECT 2020, '2020-12-31' UNION ALL
SELECT 2021, '2021-12-31' UNION ALL
SELECT 2022, '2022-12-31' UNION ALL
SELECT 2023, '2023-12-31' UNION ALL
SELECT 2024, '2024-12-31' UNION ALL
SELECT 2025, '2025-12-31'
) p
WHERE u.is_deleted = FALSE
Step 2 β Three LDM changes in GoodData
a) Update barrister_seniority_groups dataset (Create LDM Manually):
BeforeAfterGrain`barrister_seniority_group_iduser_seniority_period_id`New attributesβ`user_seniority_period_id`, `seniority_period_year`New FKβ`user_id` β `users.user_id`New date referenceβ`period_end_date` β seniority_period_date dimension
b) Remove the FK from users β barrister_seniority_groups β the old static one-group-per-barrister link on the users dataset needs to be deleted.
c) Add a new seniority_period_date date instance β same shared date dimension already used for task_date, matter_date etc. See: Using Date Dimensions
How it works after the change
tasks ββ(task_date)βββΆ date dimension βββ(period_end_date)ββ barrister_seniority_groups
β β
βββ(user_id)βββΆ users βββββββββββββββββββ(user_id)ββββββββββββββββββ
When a user selects "2022" on the dashboard, the date filter automatically scopes barrister_seniority_groups to the 2022 rows β which already have the correct group pre-calculated as-at end of 2022. barrister_seniority_group_name then behaves like any regular attribute. No MAQL required.
For full reference: Dataset concepts Β· Prepare your data / naming conventionsMira Jill Yumul
06/14/2026, 11:21 PMvw_barrister_seniority_group changes?
> So basically when we set a date range on the main filter on the dashboard for example lets say the last 6 months of last year. Based on this date range, the groups then need to change depending on that dates distance from their year of call or year of silk, depending on the group if its a silk group or not. Does that make sense?Joseph Heun
06/15/2026, 5:12 PMMira Jill Yumul
06/15/2026, 11:18 PMMira Jill Yumul
06/16/2026, 11:16 PMJoseph Heun
06/17/2026, 12:56 AMperiod_end_date column should anchor to the last day of each month rather than each year, and the date dimension on barrister_seniority_groups should be set to month granularity in GoodData to match how users will filter on the dashboard.Mira Jill Yumul
06/17/2026, 2:55 AMWITH RECURSIVE months AS (
SELECT CAST('2015-01-01' AS DATE) AS m_start
UNION ALL
SELECT m_start + INTERVAL 1 MONTH
FROM months
WHERE m_start < '2026-12-01'
),
p AS (
SELECT
m_start AS period_date,
LAST_DAY(m_start) AS period_end_date
FROM months
)
SELECT
CONCAT(`u`.`id`, '_', DATE_FORMAT(`p`.`period_date`, '%Y%m')) AS `user_seniority_period_id`,
`u`.`id` AS `user_id`,
YEAR(`p`.`period_date`) AS `period_year`,
MONTH(`p`.`period_date`) AS `period_month`,
`p`.`period_end_date` AS `period_end_date`,
(CASE
WHEN (`pref`.`dt_silk` IS NOT NULL AND TIMESTAMPDIFF(YEAR, `pref`.`dt_silk`, `p`.`period_end_date`) >= 5) THEN 1
WHEN (`pref`.`dt_silk` IS NOT NULL AND TIMESTAMPDIFF(YEAR, `pref`.`dt_silk`, `p`.`period_end_date`) < 5) THEN 2
WHEN (`pref`.`dt_silk` IS NULL AND TIMESTAMPDIFF(YEAR, `pref`.`dt_inn_call`, `p`.`period_end_date`) >= 12) THEN 3
WHEN (`pref`.`dt_silk` IS NULL AND TIMESTAMPDIFF(YEAR, `pref`.`dt_inn_call`, `p`.`period_end_date`) BETWEEN 6 AND 11) THEN 4
WHEN (`pref`.`dt_silk` IS NULL AND TIMESTAMPDIFF(YEAR, `pref`.`dt_inn_call`, `p`.`period_end_date`) < 6) THEN 5
ELSE 0
END) AS `barrister_seniority_group_id`,
(CASE
WHEN (`pref`.`dt_silk` IS NOT NULL AND TIMESTAMPDIFF(YEAR, `pref`.`dt_silk`, `p`.`period_end_date`) >= 5) THEN 'Silks (5+ years)'
WHEN (`pref`.`dt_silk` IS NOT NULL AND TIMESTAMPDIFF(YEAR, `pref`.`dt_silk`, `p`.`period_end_date`) < 5) THEN 'Junior Silks (under 5 years)'
WHEN (`pref`.`dt_silk` IS NULL AND TIMESTAMPDIFF(YEAR, `pref`.`dt_inn_call`, `p`.`period_end_date`) >= 12) THEN 'Senior Juniors (12+ years call)'
WHEN (`pref`.`dt_silk` IS NULL AND TIMESTAMPDIFF(YEAR, `pref`.`dt_inn_call`, `p`.`period_end_date`) BETWEEN 6 AND 11) THEN 'Middle Juniors (6-11 years call)'
WHEN (`pref`.`dt_silk` IS NULL AND TIMESTAMPDIFF(YEAR, `pref`.`dt_inn_call`, `p`.`period_end_date`) < 6) THEN 'Junior Juniors (0-5 years call)'
ELSE 'Unclassified'
END) AS `barrister_seniority_group_name`
FROM `users` `u`
JOIN `users_preferences` `pref` ON `pref`.`id_user` = `u`.`id`
CROSS JOIN `p`
WHERE `u`.`is_deleted` = FALSEShamil Akhmadyshev
06/17/2026, 1:22 PMMira Jill Yumul
06/19/2026, 12:05 AMMauricio Cabezas
06/19/2026, 10:21 AMBarrister Seniority Groups only connects with Users and Date β there's no link to your Tasks/Matters dataset, which is why those metrics are showing as unrelated. That said, we'd like to see the full LDM to confirm the complete picture and suggest the right fix. Could you let us know which GoodData domain/org you're working in?Mira Jill Yumul
06/19/2026, 12:47 PMJoseph Heun
06/19/2026, 4:45 PMuser_seniority has a proper grain (user_seniority_period_id), its period_end_date column is connected to a date dimension, and `barrister_seniority_group_id`/`barrister_seniority_group_name` are added as attributes, the dashboard filter won't be able to use it. Please test in staging first before applying to production. If you want, I can try and provide an update view of the json, but please test in a new workspace to ensure it fits your use case before applying to any other used workspace.Mira Jill Yumul
06/20/2026, 12:17 AMJoseph Heun
06/20/2026, 12:59 AMMira Jill Yumul
06/21/2026, 11:54 PMJoseph Heun
06/22/2026, 7:49 AMuser_seniority dataset, which was not updated in your version. It has now been given the correct grain (user_seniority_period_id), all required attributes (barrister_seniority_group_id, barrister_seniority_group_name, period_year, period_month), a foreign key reference to users, and a connection to a new seniority_period_date date dimension β all mapped to your existing vw_user_level_expertise view in the demo_uk schema. Everything else in your LDM has been left exactly as-is.
please note that when building your insight, the date filter will need to be applied to Seniority Period Date to scope the seniority groups correctly to the selected period. The tasks and matter metrics connect through users and will be available as normal.
Please test in a staging environment before applying to production, and let us know if you have any questions.Mira Jill Yumul
06/22/2026, 8:55 AM