cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Warehousing & Analytics
Engage in discussions on data warehousing, analytics, and BI solutions within the Databricks Community. Share insights, tips, and best practices for leveraging data for informed decision-making.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

How to Display Top Categories in Databricks AI/BI Dashboard?

Akshay_Petkar
Contributor

In a Databricks AI/BI dashboard, I have a field with multiple categories (e.g., district-wise sales with 50 districts). How can I display only the top few categories (like the top 10) based on a specific metric such as sales?

2 REPLIES 2

Mo
Databricks Employee
Databricks Employee

hello @Akshay_Petkar,

in your data tab, can't you create a dataset using "Create From SQL" and write a query like the following and use this dataset in your canvas?

SELECT COUNT(sales_key) total_sales, distirict FROM my_table
GROUP BY distirict
ORDER BY total_sales DESC
LIMIT 10
 
let me know if I get your question wrong ๐Ÿ˜‰

Hello @Mo 

I am creating a AI/BI dashboard where I need to add multiple charts, each showing the top 10 values. For example, I used a query like select * from table and in the canvas, I added a chart with 50 unique values, but I want to display only the top 10. In another chart, there are 100 unique values, and again, I need to show the top 10 only. How can I apply this limit across all the charts?

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group