Forum Discussion
Subtract A Measure From An Imported Column Both In The Same Table
I've inherited a BI Desktop file that needs to calculate a particular value that will be called RebateBeforeNetMargin. It needs to calculate the difference between the net margin (the measure) from the imported column named Gross Margin Amount - so basically, Net Margin - Gross Margin Amount. Note that the column is NOT a calculated column. Both the Net Margin and the Gross Margin Amounty currently exist in the same table (SalesTable) and the goal is to insert a new column (RebateBeforeNetMargin) betwen the two existing columns. Here's what the existing table currently looks like:
The Net Margin measure is:
THar01 If you are creating a measure, you need to wrap column references in an aggregator like MAX, MIN, SUM, etc.
2 Replies
- Greg_DecklerCommunity Champion
THar01 If you are creating a measure, you need to wrap column references in an aggregator like MAX, MIN, SUM, etc.
- THar01Frequent Visitor
Thanks Greg, the SUM function did the trick:
RebateB4NetMarg = [net margin 1] - SUM('SalesTable'[Gross Margin Amount])