0
0
Google Sheetsspreadsheet~8 mins

ORDER BY clause in Google Sheets - Dashboard Guide

Choose your learning style9 modes available
Dashboard Mode - ORDER BY clause
Goal

Sort a list of products by their sales amount to quickly see which products sold the most and which sold the least.

Sample Data
ProductCategorySales
ApplesFruit150
BananasFruit120
CarrotsVegetable90
BroccoliVegetable110
OrangesFruit200
PotatoesVegetable130
Dashboard Components
  • Sorted Sales Table: Shows products sorted by sales from highest to lowest.
    Formula: =SORT(A2:C7, 3, FALSE)
    Explanation: Sorts the range A2:C7 by the 3rd column (Sales) in descending order (FALSE means descending).
  • Top Product Card: Displays the product with the highest sales.
    Formula: =INDEX(SORT(A2:C7, 3, FALSE), 1, 1)
    Explanation: Sorts by sales descending, then picks the first product name.
  • Top Sales Amount Card: Shows the highest sales value.
    Formula: =INDEX(SORT(A2:C7, 3, FALSE), 1, 3)
    Explanation: Sorts by sales descending, then picks the first sales number.
Dashboard Layout
+----------------------+-----------------------+
|   Top Product Card    |  Top Sales Amount Card |
+----------------------+-----------------------+
|                                              |
|             Sorted Sales Table                |
|                                              |
+----------------------------------------------+
Interactivity

Add a filter dropdown to select a category (Fruit or Vegetable). When a category is selected, the sorted table and top product cards update to show only products from that category.

Example filter formula: =FILTER(A2:C7, B2:B7=E1) where E1 is the selected category.

Then apply SORT on the filtered data to keep sorting by sales.

Self Check

If you add a filter to show only 'Fruit' category, which products appear in the sorted table?

Answer: Oranges, Apples, Bananas (sorted by sales descending: 200, 150, 120)

Key Result
Dashboard shows products sorted by sales with top product and sales cards, and updates by category filter.