[]
In this guide, we’ll walk through how to apply data bar conditional formatting to a table column. At the end, we’ll include an example query using the AdventureWorks Data Warehouse.
In your Wyn dashboard, select the table you want to format.
Once selected, the action buttons will appear on the right-hand side.
Click the Conditional Formatting button from the action menu.
The Conditional Formatting window will open.
Under Set For, choose the column where you want to apply data bars.
Example: Total Sales Amount.
Set Based On to Field Value.
For Style, select Data Bar.
Click the pencil icon next to Data Bar to open the properties panel.
In the properties window, locate the Minimum and Maximum settings.
For Minimum Type, set to Lowest Value.
For Maximum Type, set to Highest Value.
(Optional) Customize the bar appearance:
Choose Solid Fill or Gradient.
Pick a color for the bar.
Decide whether to show the bar only or the bar with the numeric value.
Set bar direction (Left-to-right is the default).
Click OK to save your changes.
Here’s a sample query you can run against the AdventureWorksDW database to get a table sorted by sales amount:
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 here is the table that has been built and conditionally formatted:
