We are going to round off this chapter with a look at some examples of mathematical patterns, both simple and complex.
The following examples are based on the measures included in the Mathematical operations section of the Quick Measures feature found in Power BI Desktop:
- First, we have some examples of basic mathematical operation patterns, starting with an expression that will create a measure using the addition pattern:
Sales Amount plus Sales Tax =
SUM ( 'Sales'[Sales Amount] ) + SUM ( 'Sales'[Sales Tax] )
- The following expression will create a measure that uses the subtraction pattern:
Sales Amount minus Discount Amount =
SUM ( 'Sales'[Sales Amount] ) - SUM ( 'Sales'[Discount Amount] )
- The following expression will create a measure that uses the multiplication pattern:
Unit Price x Sales Quantity...