Hi GD, I have a question on using dates as visuali...
# gooddata-cloud
r
Hi GD, I have a question on using dates as visualisation filters. What is the best way to go about excluding from the visualisation any user with hire date in the last two weeks? I attempted using the "relative" period with Date as Hire Date, I would expect to see period start anytime and period ends 2 weeks ago. But the oldest I can go in the UI is 104 weeks ago, which would exclude longer tenure employees. Any suggestions on how to achieve this?
m
Hi Raffaella, Thank you for this. I have been testing on my end and I manage to have even more 'Weeks Ago'. How I did it: 1. GET the visualizationObjects
GET {{baseUrl}}/api/v1/entities/workspaces/:workspaceId/visualizationObjects/:objectId
2. Copy the response and paste it on the PUT body in the same endpoint, just editing the part of the filter
PUT {{baseUrl}}/api/v1/entities/workspaces/:workspaceId/visualizationObjects/:objectId
Body:
Copy code
...

                "filters": [
                    {
                        "relativeDateFilter": {
                            "dataSet": {
                                "identifier": {
                                    "id": "SaleDate",
                                    "type": "dataset"
                                }
                            },
                            "granularity": "GDC.time.week_us",
                            "from": -200,
                            "to": -25
                        }
                    }
                ],
...
As you can see I wrote '-200'. It seems is just a UI limitation, our apologies for that, I will submit a product feedback on your behalf in order to have the possibility to have a bigger number or to chose it manually. Thank you.
r
Hi Mauricio, Thanks for your response and for submitting product feedback. Our customers don't have access to the API so it is very important they are able to achieve this result when creating reporting via the embedded UI.
1
p
🎉 New note created.