Conditional highlights use visual indicators (colors and fonts) to draw attention to data in a field, which meet certain user-specified expression-based conditions.
Figure 18: A conditional highlight in action.
Draw from the last example: Looking over the results currently displayed in the grid, you may have noticed several sales transactions in which customers paid more for shipping then was paid for the actual items purchased. Concerned for the interests of our customers, we may want to perform some further investigations to determine how often this situation occurs. Therefore, we want to know all instances where customers paid 100% or more for Freight, relative to the ExtendedPrice ([Freight] / [Extended Price] >= 1.00). Notice that the expression is almost exactly the same as the one used in the previous example.
- Select the E3 button
on the toolbar to start the wizard. - Select New Conditional Highlight, name it "Over Price Freight", and click Next.
- On the first Field Properties screen, switch to the Fields tab.
- Double-click on Freight in the Fields list to begin the expression.
- Press the "/" key to specify division.
- Double-click on ExtendedPrice to add it to the expression.
- Switch to the Keywords tab.
- Expand the Logic category and double-click on ">=" (greater than or equal to) to add it to the expression.
- Type "1.00" to complete the expression.
- Select Next to proceed to the second Field Properties screen.
- In the Cell Style section, select Vertical from the Gradient drop-down menu and Red from the Color End drop-down menu. The selected settings can be previewed at the bottom of the screen before applying them.
- To apply the highlight select Finish.
The conditional highlight makes it easy to spot the transactions where the shipping costs were as much or more than the cost of goods sold.
NOTE: Notice that the newly created conditional highlight is listed in the Highlights section of the View Properties panel.
Recheck Shippers.CompanyName in the Fields section of the View Properties panel to show the "offending" shippers. The corresponding column (field) is reinserted into the grid, making it possible to determine which shippers are responsible for the excessive freight costs. We could go even further to determine which shippers most often over charged, but that is beyond the scope of this demonstration.