Philippe Hébert
04/18/2022, 8:00 PM{
"from": -4,
"granularity": "GDC.time.week_us",
"localIdentifier": "relative_past_4_next_8_std_week",
"name": "Past 4, Next 8 std weeks",
"to": 7,
"visible": true
}
Current filters available (see attached screenshots).
I've:
• Validated that the project ID is the same on the Grey Page URL used to Customize Date Filters as for the dashboard associated with the above screenshot
• Validated that visible
on the new custom date filter is set to true
• Refreshed the grey page to ensure that the change has been saved properly
What am I missing?Philippe Hébert
04/18/2022, 8:19 PMJakub Sterba
04/18/2022, 10:58 PM{
"analyticalDashboard" : {
"content" : {
"dateFilterConfig" : {
"addPresets" : {
"relativePresets" : [
{
"from" : -4,
"granularity" : "GDC.time.week_us",
"localIdentifier" : "relative_past_4_next_8_std_week",
"name" : "Past 4, Next 8 std weeks",
"to" : 7,
"visible" : true
}
]
},
"filterName" : "Date range",
"mode" : "active"
},
...
There is no way how you can set arbitrary floating range of weeks in Analytical Designer for insight currently. You can workaround it using MAQL expression
select M where Week (Sun-Sat)/Year between this-4 and this+7
Jakub Sterba
04/18/2022, 11:22 PMPhilippe Hébert
04/19/2022, 3:20 PMhttps://{your-domain}/gdc/md/{workspace-id}/query/datefilterconfigs
returns only one result
2. Said result in (1) returns the object I have modified, with the modification still there.
3. No overrides are present on tested dashboards
Re: Custom date filter configs in Insights
There is no way how you can set arbitrary floating range of weeks in Analytical Designer for insight currently.OK, that's sad :( Re: Workaround Thanks for the info. If possible I'd like to avoid doing custom MAQL to apply filters on data as I feel like this could lead to error-prone usage.
Jakub Sterba
04/19/2022, 3:32 PMJakub Sterba
04/19/2022, 3:35 PMPhilippe Hébert
04/19/2022, 3:37 PMJakub Sterba
04/19/2022, 3:45 PMhttps://{my-domain}/gdc/md/{workspace-id}/obj/9?mode=edit
but metadata object in your workspace may have different oid than 9. I edited the JSON and I submitted the change.
Here is the content which is followed by meta section about dateFilterConfig metadata object such as author, category etc.:
{
"dateFilterConfig" : {
"content" : {
"absoluteForm" : {
"localIdentifier" : "absoluteForm",
"visible" : true
},
"allTime" : {
"localIdentifier" : "allTime",
"visible" : true
},
"relativeForm" : {
"granularities" : [
"GDC.time.week_us",
"GDC.time.month",
"GDC.time.year",
"GDC.time.quarter",
"GDC.time.date"
],
"localIdentifier" : "relativeForm",
"visible" : true
},
"relativePresets" : [
{
"from" : -4,
"granularity" : "GDC.time.week_us",
"localIdentifier" : "relative_past_4_next_8_std_week",
"name" : "Past 4, Next 8 std weeks",
"to" : 7,
"visible" : true
},
{
"from" : -6,
"granularity" : "GDC.time.date",
"localIdentifier" : "relative_last_7_days",
"to" : 0,
"visible" : true
},
{
"from" : -29,
"granularity" : "GDC.time.date",
"localIdentifier" : "relative_last_30_days",
"to" : 0,
"visible" : true
},
{
"from" : -89,
"granularity" : "GDC.time.date",
"localIdentifier" : "relative_last_90_days",
"to" : 0,
"visible" : true
},
{
"from" : 0,
"granularity" : "GDC.time.week_us",
"localIdentifier" : "relative_this_week",
"to" : 0,
"visible" : true
},
{
"from" : -1,
"granularity" : "GDC.time.week_us",
"localIdentifier" : "relative_last_week",
"to" : -1,
"visible" : true
},
{
"from" : -1,
"granularity" : "GDC.time.week_us",
"localIdentifier" : "relative_last_two_weeks",
"to" : 0,
"visible" : true
},
{
"from" : 0,
"granularity" : "GDC.time.month",
"localIdentifier" : "relative_this_month",
"to" : 0,
"visible" : true
},
{
"from" : -1,
"granularity" : "GDC.time.month",
"localIdentifier" : "relative_last_month",
"to" : -1,
"visible" : true
},
{
"from" : -11,
"granularity" : "GDC.time.month",
"localIdentifier" : "relative_last_12_months",
"to" : 0,
"visible" : true
},
{
"from" : 0,
"granularity" : "GDC.time.quarter",
"localIdentifier" : "relative_this_quarter",
"to" : 0,
"visible" : true
},
{
"from" : -1,
"granularity" : "GDC.time.quarter",
"localIdentifier" : "relative_last_quarter",
"to" : -1,
"visible" : true
},
{
"from" : -3,
"granularity" : "GDC.time.quarter",
"localIdentifier" : "relative_last_4_quarters",
"to" : 0,
"visible" : true
},
{
"from" : 0,
"granularity" : "GDC.time.year",
"localIdentifier" : "relative_this_year",
"to" : 0,
"visible" : true
},
{
"from" : -1,
"granularity" : "GDC.time.year",
"localIdentifier" : "relative_last_year",
"to" : -1,
"visible" : true
}
],
"selectedOption" : "relative_this_month"
},
...
Philippe Hébert
04/19/2022, 3:47 PMJakub Sterba
04/19/2022, 3:53 PMPhilippe Hébert
04/19/2022, 4:28 PMJakub Sterba
04/19/2022, 7:22 PMPhilippe Hébert
04/21/2022, 2:12 PM<https://votresucces-dev.on.gooddata.com/gdc/md/vyx9zuicsvv3rtjk9ry1myao6x4i2a40/obj/9?mode=edit>
2. I updated the configuration (see snippet)
3. I clicked on submit
4. I refreshed the dashboard on which I expected the change to appear (<https://votresucces-dev.on.gooddata.com/dashboards/#/workspace/vyx9zuicsvv3rtjk9ry1myao6x4i2a40/dashboardId/4320>
)
5. The changes did not appear - instead the previously added "Past 4, Next 8 std weeks" disappeared (back to default).
6. I navigated back to <https://votresucces-dev.on.gooddata.com/gdc/md/vyx9zuicsvv3rtjk9ry1myao6x4i2a40/obj/9>
and validated that my changes took effect (they did!)
Did you do anything different from what I did when you successfully updated the dateFilterConfig object?Philippe Hébert
04/21/2022, 2:12 PMJakub Sterba
04/21/2022, 2:41 PMThere were duplicate localIdentifiers in the date filter config: relative_next_week
and it is indeed the case:
{
“from” : 0,
“granularity” : “GDC.time.week_us”,
“localIdentifier” : “relative_next_week”,
“name” : “This + Next week”,
“to” : 1,
“visible” : true
},
{
“from” : 1,
“granularity” : “GDC.time.week_us”,
“localIdentifier” : *“relative_next_week*”,
“name” : “Next week”,
“to” : 1,
“visible” : true
},
{
“from” : 2,
“granularity” : “GDC.time.week_us”,
“localIdentifier” : “relative_next_week”,
“name” : “Second next week”,
“to” : 2,
“visible” : true
},identifier must be unique
Philippe Hébert
04/21/2022, 2:42 PMPhilippe Hébert
04/21/2022, 2:44 PMPhilippe Hébert
04/21/2022, 2:44 PMJakub Sterba
04/21/2022, 2:45 PMPhilippe Hébert
04/21/2022, 2:45 PM