Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a table as shown below
I am calculating Current - Dec = (Current Month POC - Last Year December month POC)
Eg: for January-2018, 28.30-19.90 = 8.4, for February-2018, 39.40-19.90 = 19.5.
But My Values are wrong as highlighted in the above image.
What is wrong with my expression here? Attached is the file for reference
Sum(POC) - Sum({<Num_Month = {'$(vPreYearLastMonth)'},Year = {'$(vPreYear)'}>}POC)
thanks
Bhavesh
Try this
Sum(POC) - Above(TOTAL Sum(POC), Num(Month))
I think your values for Jan, Feb, Mar are not right.... they should be 0, 0, and 0, right because you have 100-100 for all three months of 2018
Try this
Sum(POC) - Above(TOTAL Sum(POC))
@sunny_talwar the expression is working now, but I want Last year December POC as base value, and calculating current month POC - December month POC
Try this
Sum(POC) - Sum(TOTAL {<Num_Month, Year, MonthYear = {"$(=MinString(MonthYear))"}>}POC)
ask, if instead of using set analysis, you have it precalculated at that value? you could use the sentence "Previous" to obtain the value of the previous record, also adding an if you want to make sure that it is Project_Number indicated, you should also order it in a desc way. Regards!!!!
@sunny_talwar it is working fine, but when we include November-2017, or October-2017 the base value changed to November-2017, October-2017. I tried to include these variables in the set analysis which is giving me an error.
Let vPreYear = Year(AddYears(Today(),-2));
Let vPreYearLastMonth = '12';
So, what would you expect to see when you select Dec 2016 to Dec 2018 (2 years)
Jan 2017 - Dec 2016
Feb 2017 - Dec 2016
...
Dec 2017 - Dec 2016
Jan 2018 - Dec 2017
Feb 2018 - Dec 2017
...
Dec 2018 - Dec 2017
Yes, what you've written is correct.
Dec 2016 should be base value for all months from Jan-2017......Dec-2017
Dec 2017 should be base value for all months from Jan-2018......Dec-2018
Can you please add a sample where we have 2 years like the above mentioned. I will have to test it out before I gave an expression which will work for you.