Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
if(PROD_StoreID='34', (if(PROD_Year='2014',PROD_CPH_Actual))-(if(PROD_Year='2015',PROD_CPH_Actual)))
By Store, I need to subtract PROD_CPH_Actual from 2014 and 2015. What is the best way to write this?
You could use set analysis for this - in this case changed to flexible years depending from the selections but you could replace it with fixed values like the StoreID:
sum({< PROD_StoreID = {34}, PROD_Year = {"$(=max(PROD_Year) -1)"}>} PROD_CPH_Actual) -
sum({< PROD_StoreID = {34}, PROD_Year = {"$(=max(PROD_Year))"}>} PROD_CPH_Actual)
- Marcus