Hello,
I am doing this exercise in PowerPivot Model. I have over 100K items in my model. Avg_Net_Cost_23 is the cost of the item in the year 2023 and Avg_Net_Cost_24 is the cost of the item in the year 2024. It is possible for the cost of an item to be negative, zero, or positive depending on several factors.
My goal is to compute the variance between 2024 and 2023. I would like the formula to return a value of zero if either 2023 or 2024 has an item cost of zero. For instance, if Avg_Net_Cost_23 or Avg_Net_Cost_24 is zero, I would the formula to return zero. I would like to tweak the formula below to achieve this result. I have attached a screenshot of the pivot.
Hi ankit, thank you for your help…I forgot to mention that Avg_Net_Cost_23 and Avg_Net_Cost_24 are measures in my model and not regular columns, so the Max function did not work. But I went ahead to remove that piece (as shown below) and was able to obtain the desired result. However, the only issue now is the sum of individual rows matches the expected result but the grand total is showing something different. I know from previous video lessons by Sam, this formula can help fix grand total issues. Do you have any suggestions?