[]
        
(Showing Draft Content)

Format Cells Between Two Values

In this guide, we’ll walk through how to highlight rows where the Total Quantity is between two values, and then we’ll finish with a sample AdventureWorks query.


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 the entire row is highlighted, not just a single cell.

  2. Leave Based On set to Field Value.

  3. For Referenced Field, choose Total Quantity.

  4. For Style, open the dropdown and select New Rule…


Step 4: Define the “Between” Rule

  1. In the list of rule types, select Format only cells that contain.

  2. In the properties panel:

    • Change the condition to Between.

    • Enter the two numeric values you want to use as boundaries.

      • Example: 500 and 700.

  3. After the word Preview, choose your formatting style.

    • Example: White Fill with Dark Blue Text.

  4. Click OK to close the properties window.

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


Example: Highlighting Rows Between 500 and 700 Orders

Here’s a query you can run against AdventureWorksDW to get a dataset with Total Quantity values that you can use for this rule:

SELECT TOP 20
    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 which uses conditional formatting: