How to calculate aggregates with different granularity

Hi, I’m new in Druid and I’m trying to migrate some old SSAS cubes to Druid. But I’m having problems when I try to calculate aggregations between two fact tables with different granularity.

I’m trying to calculate the budget execution. The problem is that I have my sales fact table with a day granularity, but my budget fact table has a month granularity.

For instance

My Sales table is similar to this

Day - Sales

2020/01/01 - 1.000

2020/01/02 - 900

2020/01/03 - 1.200