Hi
In analysis view if I want to calculate current week for last year what is the formula? I use CW but it only shows one day which is 2/5/2023. My goal was to use CW-1Y but this does not work. I thought CW should show 1/30/2023..2/5/2023 but it shows 2/5/2023.
Any help will be greatly appreciate it.
Hi,
Did you check as per below code? Not sure if it will work for you.
CALCDATE('<-1Y>',TODAY)..CALCDATE('<CW-1Y>',TODAY)
Result - 31/01/22..05/02/22
Thanks Mr Bruvik
It is totally understandable. I was hoping that CW or etc works and filter for true current week not the end of the current week. But I believe I was wrong and that was not intention of CW.
I will look into custom code or see if I can find work around
Yes- what you are trying to do is to combine a date formula and a date filter and that will not work.
So a date formula field will only let you enter a calc formula. Once you add the .. you indicates that you are working with a filter.
I don't know if that was understandable.
So i think you need some custom code to make that work.
Thanks Mr Bruvik
I tried that and did not work. See below. the only formula that works is "-CW-1Y..CW-1Y" but I cannot enter this in Inventory Analysis Template since I get the below error
"Validation Results: Your entry of '-CW-1Y..CW-1Y' is not an acceptable value for 'Comparison Date Formula'. The date formula '-CW-1Y..CW-1Y' must include plus (+) or minus (-)."
Or if enter in Period instead of date
"Validation Results -CW-1Y..CW-1Y is not a valid Period Formula."
Formula
Result
formula
Result
What if you try CW-52W, does that make a difference?
If not we could look at using the week number and find the same week number last year. But that takes some more code.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156