Sum value on a specific time window deduplicating
I'm trying to solve something a bit weird. It was working correctly, and without doing anything, my card is not working anymore. When I'm editing it, it's completely broken
Type of data
What I'm trying to achieve is to build a is a Line + Grouped bar chart per week with 3 types of data
You can notice that the daily_service_sales values is repeated each time a placement is performing
3 beast mode are used into the following card
weekly_service_sales : sum of unique daily_service_sales per week
(SUM(SUM((daily_service_sales)) OVER(partition by YEAR(`date`),WEEK(`date`), `service`))
weekly_placement_sales: sum of daily_placement_sales per week
(SUM(SUM((daily_placement_sales)) OVER(partition by YEAR(`date`),WEEK(`date`), `service`))
weekly_ratio : weekly_placement_sales / weekly_placement_sales
The current card
When I'm trying to edit it or trying to create a new one.
Am I doing something wrong?
Help me please,