Hi team, I have a question about how the time-over...
# gooddata-cloud
m
Hi team, I have a question about how the time-over-time comparison works in the visualizations on the dashboard- so we have it set to the settings: Full stop- This year Compare the full stop with - Same period last year But it tends to show the current year so far vs the entirety of last year's total, which makes the difference (%) rather misleading. Another question I have is that if I were to post a context filter via the API, how can I make sure that it is posted as hidden on the dashboard it goes to?
đź‘€ 1
j
Hi Maria, Unfortunately, this is expected and this is how the Headline widget is designed. As it doesn’t contain specific data points (as your line chart below does) and you cannot hover over a specific value in time - when selecting “this year” the previous period will be always compared with the whole last year. The only way how to compare the period of this year till now is to pre-select a Static period e.g 1.1 till 21.3 and compare it to the same period of last year. That will give you correct result in this case. Also, if you use for example months or quarter granularity (e.g “last month”, “last quarter”) it will work as well.
Regarding your second question. The easiest way how to go about is to simply set some dashboard filter to be hidden in the UI. Then calling workspace layout endpoint: https://www.gooddata.com/api/v1/layout/workspaces/{workspaceId} And see how the hidden filter looks like. For example in my case, I can see the below part of the workspace layout:
Copy code
{
  "content": {
    "attributeFilterConfigs": [
      {
        "localIdentifier": "employee.address_1_attributeFilter",
        "mode": "hidden"
      }
    ],
    "filterContextRef": {
      "identifier": {
        "id": "aa5ccc32-b831-47a2-98d4-116caeba29f8",
        "type": "filterContext"
      }
    }
  }
}
As you can see, you would need to set the
"mode": "hidden"
in the “attributeFilterConfigs” property.
The default setting is
"mode": "active"
m
Setting a static period for the headline would mean changing it everyday though? Isn't there any way to get this comparison dynamically?
j
Hi Maria, unfortunately I’m not aware of any way how to achieve that with Headline widget. As I’ve mentioned, you could also used last month, last quarter, etc. Otherwise, I can only provide you with product feedback in this case.
I’m sorry if this was not the answer you were hoping for.
m
Hi Julius, that's fine- yes, please take this as product feedback since the headline looks rather alarming with the state of the change being that huge.
p
🎉 New note created.