Power Pivot Principles: Caution when Negating Formulae
5 June 2018
Welcome back to our Power Pivot blog. Today we discuss negating formulas in Power Pivot.
In our previous blog here, you may recall that we were creating a measure that calculated refunds. Let’s now consider that we want to have that measure be negated. To do this, go to the ‘Power Pivot’ tab on the Ribbon and then click on the ‘Measures’ drop-down menu:
The ‘Manage Measures’ dialog box will appear, allowing us to select the ‘Refunds’ measure. Next, select the ‘Edit’ button:
The ‘Refund’ measure will appear, where we can add a negative operator in-front of the formula viz.
On some occasions, negating the formula via this method does not seem to work DAX. Further the minus sign – straight after the equals sign – can easily be missed by the unwary. There is a simple, safer option: multiply the entire formula by negative 1 instead: