'Time shift' defaults to previous year - in legacy Metric lens

Hi!

I´ve created a Legacy Metric lens that should display the Trend (in percent CO2) compared to a baseyear of 2019. But it always defaults to display the trend compared to previous year.

I´ve created a small video here about the error.

This is my code:
<
(sum(co2tonnes) - sum(co2tonnes, shift='startAt(2018-12-31T23:00:00.000Z)'))
/
(sum(co2tonnes, shift='startAt(2018-12-31T23:00:00.000Z)'))
/>

When I edit the lens and changes the global time, it works perfectly and shows the correct numbers compared to 2019:
2020 -69%
2021 -89%
2022 -98%

But when the lens is saved to the dashboard, it instead shows the numbers compared to prevoius year instead which is wrong:
2020 - 69%
2021 -64%
2022 -78%

This seems to be a bug. Anyone knows what to do?

I think you hit a bug @Andreas_Schennings. Sorry for the inconvenience.

I could reproduce and opened an issue, feel free to subscribe or chime in with any additional feedback

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.