Sorting Year over Year on a graph

Hello everyone,

I am new to Data Studio and trying to build a pretty simple graph to have a YoY comparison for sales (so 2024-2026).

For this I have data saved in two columns - sales & start date. To have these two period separately I have created a custom dimension called YoY using this formula :

CASE
WHEN start_date >= DATE(2024,6,1) AND start_date < DATE(2025,6,1) THEN “Période 2024-2025”
WHEN start_date >= DATE(2025,6,1) AND start_date <= DATE(2026,6,1) THEN “Période 2025-2026”
END

However, it doesn’t work and shows no data :frowning: I am also attaching a screenshot how I put into dimensions, start date (by month). Would be very grateful for any help and ideas !!!

1 Like