Solved

API - Filter & Column Order are incorrect

  • 5 April 2022
  • 1 reply
  • 61 views

Userlevel 2

Is there any solution to the ordering issues listed below?

 

Problem 1: Filter order within APIs is wrong. It’s sorted by the Looker’s internal database ID for filters, instead of by the actual order of the filters on the dashboard. See example below.

 

Problem 2: Column order within APIs is wrong. It uses the order within the Data tab instead of the Visualization tab, which doesn’t allow measures to be intermixed with dimensions.

 

We’ve had these limitations for so long now that it’s caused so many issues for our team. We’ve gone through many phases of managing these flaws that were honestly at a breaking point with the sheer amount of time lost and constant filter/column order issues. It’s frustrating, to say the least.

 


 

Filter example:
I inputted the filter numbers directly into name of the filter to make it easy to see which position the filter should be at. As we can see, the API is ordering filters by the `id` value instead.

 

[{
"id": 3073,
"name": "Created Date (filter #6)",
"label": "Created Date (filter #6)",
"type": "field_filter",
"valueType": "date_date",
"suggestions": null,
"value": ["1 days"],
"defaultValue": "1 days",
"listenFilters": [],
"filterType": "advanced",
"metadata": {
"model": "blabla",
"explore": "blabla",
"dimension": "blabla.blabla"
}
}, {
"id": 3074,
"name": "Knob Type (filter #5)",
"label": "Knob Type (filter #5)",
"type": "field_filter",
"valueType": "string",
"suggestions": null,
"value": [],
"defaultValue": "",
"listenFilters": [],
"filterType": "button_group",
"metadata": {
"model": "blabla",
"explore": "blabla",
"dimension": "blabla.blabla"
}
}, {
"id": 3075,
"name": "Knob Color (filter #2)",
"label": "Knob Color (filter #2)",
"type": "field_filter",
"valueType": "string",
"suggestions": null,
"value": [],
"defaultValue": "",
"listenFilters": [],
"filterType": "advanced",
"metadata": {
"model": "blabla",
"explore": "blabla",
"dimension": "blabla.blabla"
}
}, {
"id": 4481,
"name": "Door Color (filter #3)",
"label": "Door Color (filter #3)",
"type": "field_filter",
"valueType": "string",
"suggestions": null,
"value": [],
"defaultValue": "",
"listenFilters": [],
"filterType": "advanced",
"metadata": {
"model": "blabla",
"explore": "blabla",
"dimension": "blabla.blabla"
}
}, {
"id": 5570,
"name": "Door Material (filter #4)",
"label": "Door Material (filter #4)",
"type": "field_filter",
"valueType": "string",
"suggestions": null,
"value": [],
"defaultValue": "",
"listenFilters": [],
"filterType": "advanced",
"metadata": {
"model": "blabla",
"explore": "blabla",
"dimension": "blabla.blabla"
}
}, {
"id": 6043,
"name": "Hinge Color (filter #1)",
"label": "Hinge Color (filter #1)",
"type": "field_filter",
"valueType": "string",
"suggestions": null,
"value": [],
"defaultValue": "",
"listenFilters": [],
"filterType": "advanced",
"metadata": {
"model": "blabla",
"explore": "blabla",
"dimension": "blabla.blabla"
}
}]

 

icon

Best answer by Ryannn29 23 May 2022, 20:11

View original

1 reply

Userlevel 2

This was answered by Looker chat support.

Filter order: Under `dashboard_filters` where each filter’s settings are listed, `row` is what defines the filter’s position. It’s which is 0-based, meaning a value of `0` indicates the 1st filter, `1` indicates the 2nd filter, etc.).

Reply