The problem: periodOverPeriodLastValue only returns values where both periods exist. So if the current year’s data stops in August, it cuts off the prior year’s September–December as well. I need a way to keep the prior year’s full data line.
Constraints:
I’m using field Departure Date on the X-axis because it’s tied to a period parameter (e.g. week, quarter, month, year) and I don’t want to lose that functionality.
Hi @JRoz,
PeriodOverPeriod calculations often cause these types of scenarios as there needs to be an equal period this year to run against the prior timeframe period.
What if you tried creating two separate fields that sum the numbers based on the year; something like: sumIf({Weight}, truncDate('YYYY', {Departure Date}) = 2025)
Or for something dynamic, you could try utilizing the addDateTime function with truncdate to base it on your different periods.
Let me know if you have any additional questions or if one of these options could work for your case
Hi! I like your solution! Me, myself decided to do dynamic LAG (with couple of IF’s depending on what Period the user selected). So basically I lagged this year values to previous year which also got rid of the ‘equal period problem’