I have this little visual that uses the periodOverPeriodLastValue function. When I add the field with the truncDate the calculated field with the periodOverPeriodLastValue shows nothing. But it has nothing to do with the calculation.
Hello @Nico, this is really interesting. There are a few things I want to mention. As for the truncDate function within your periodOverPeriod calculation, I have seen similar issues before. Whenever I am using a LAC-W aggregation, and I need to partition by something like a Date Month, I will create a separate calculated field, Date Month = truncDate('MM', {Date}) , that I can then reference in my sumOver function, sumOver({Sales}, [{Date Month}], PRE_AGG).
Utilizing the calculations like that avoids running into any errors. I noticed in my own testing that periodOverPeriod functions tend to have the same issue. I tried using a truncDate calc in the function and replaced it with a calculated field and it worked without an issue:
I also think the first error is just an issue with the table visual. It seems to be confused on how to group the 2 different date values with the periodOverPeriod aggregation. If you really want to show that 2nd date, you may be able to convert the value to a string to bypass the issue.
I also created an analysis in Arena to test out some of these calculations. If you have any further questions, we can work from here to test out possible solutions.
Hello @Nico, I wanted to follow-up since we have not heard back from you. Did my last response help resolve the issue you are facing? If so, please mark my reply as the solution. Otherwise, please provide some more information about the problem you are facing and I can help guide you further.
If we do not hear back from you in 3 days, I will archive this topic. Thank you!