

Let’s create another example where we want to calculate a profit margin for our product categories. This is a great example of how we can use a calculated column to add a fixed value for each row that we can use later in the ROWS, COLUMNS, or FILTERS area of PivotTable or in a Power View report. Our new Product Category formula uses the RELATED DAX function to get values from the ProductCategoryName column in the related Product Category table and then enters those values for each product (each row) in the Product table.

In our Product table, we can create a calculated column named Product Category like this: What we want is for each product in the Product table to include the product category name from the Product Category table. We have another related table named Product Category that contains a column ProductCategoryName. We have columns for Product Name, Color, Size, Dealer Price, etc. Each row in the Product table contains all sorts of information about each product we sell.

Let’s first look at an example where we use a calculated column to add a new text value for each row in a table named Product. Implicit measures are great for quick and easy aggregation, but they have limits, and those limits can almost always be overcome with explicit measures and calculated columns. By nature, because it’s numeric, it will automatically be summed, averaged, counted, or whatever type of aggregation you select. If your data has a column with numeric values, you can easily aggregate it by selecting it in a PivotTable or Power View Field List.
#Stimulsoft calculated column with aggregate function how to#
When first learning how to use Power Pivot, most users discover the real power is in aggregating or calculating a result in some way.
