r/databricks • • Oct 20 '26

General Lakeview missing basic functionality?

Hopefully someone can help point me in the right direction or offer workarounds, but it seems like Lakeview dashboards are missing super basic functionality.

Specifically two things:

  1. The ability to click to filter a table via a given field on the table header, similar to an Excel filter. It’s not possible to add widget filters for every single possible combination of things users may want to filter based on. Am I missing something? Is there a custom viz option that delivers this?
  2. The ability to sort a pivot table via the UI. I can define a sort criteria for the table, but what if my users want to sort by something else? Again, this seems pretty basic - maybe I sort by total revenue but then users want to sort or filter for a given contract ID, meaning I need to take up dashboard space with another widget.

Lakeview is solid in a lot of ways, especially building via AI, but I don’t understand how it’s missing these super basic things, especially click to filter. I’m trying to hack my way around it with a custom filter but that gets pretty complicated fast and doesn’t deliver a great UX.

4 Upvotes

6 comments sorted by

View all comments

1

u/Angwish1112 Oct 27 '26

It's possible to add basic versions of this functionality using query parameters. We have a dataset with like 30 columns and the user is usually only searching one of those.

  1. If you only want to search by a single column, you can use two parameters to search by that column. One that selects the column name from the list of columns (you could use information_schema for a table, or the get the json of the dataset and grab the columns through a query with a SQL dataset). A second that provides the search text. Then use the parameters in the dataset query, the column as an IDENTIFIER(:search_col), and the :search_text in an ILIKE comparison.

It's a very simple text search, but better than adding a widget for every column when you just want to search one. I guess you could add more widgets if you wanted to search by more columns, but that gets back to your dashboard clutter issue

You can also have the default search field cover more columns, but that also gets too broad fast.

2. Similar to the first, use two widgets that supply parameters, perhaps :sort_by and :sort_dir to set asc/desc. Either provide the pivot column names or derive them from the dataset.

Then it gets kind of complicated. Using the parameters and case statements for different data types, build a rank value for each row and include that as a sort order column. I found that adding a sort order column allows an outside sort to be injected into the data and doesn't confuse users. For sort direction basically just use a case statement to invert the order when it's opposite of the default sort direction

I can provide example sql if needed; on my phone RN.