[]
        
(Showing Draft Content)

Format Top Ranked Values

In this guide, we’ll walk through how to highlight the Top 10 products by sales amount, and finish with an example query from the AdventureWorks Data Warehouse.


Step 1: Select the Table

  1. In your Wyn dashboard, select the table you want to format.

  2. Once selected, the action buttons appear on the right-hand side.


Step 2: Open Conditional Formatting

  1. Click the Conditional Formatting button from the action menu.

  2. The Conditional Formatting window will open.


Step 3: Configure the Rule

  1. Under Set For, select Entire Row.

    • This ensures that the whole row is highlighted, not just a single cell.

  2. Leave Based On set to Field Value.

  3. For Referenced Field, choose Total Sales Amount.

  4. For Style, open the dropdown menu and select Top/Bottom Rules  Top 10 Items…


Step 4: Define the Top 10 Rule

  1. In the pop-up window that appears, confirm the option:

    • Format cells that rank in the TOP: → leave this as 10.

  2. After the word With, choose your formatting style.

    • Example: Green Fill with Dark Green Text.

  3. Click OK to close the pop-up.

  4. Click OK again in the Conditional Formatting window to apply the rule.


Example: Highlighting the Top 10 Products by Sales

Here’s a sample query you can run against the AdventureWorksDW database to get product sales data:

SELECT
    p.ProductKey,
    p.EnglishProductName AS ProductName,
    SUM(f.SalesAmount) AS TotalSalesAmount,
    SUM(f.OrderQuantity) AS TotalQuantity
FROM
    FactResellerSales AS f
JOIN
    DimProduct AS p ON f.ProductKey = p.ProductKey
JOIN
    DimDate AS d ON f.OrderDateKey = d.DateKey
WHERE
    d.CalendarYear = 2013
GROUP BY
    p.ProductKey,
    p.EnglishProductName
ORDER BY
    TotalSalesAmount DESC;

And this is the table with the conditional format applied to it: