Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
fefifa
Frequent Visitor

Breakdown Monthly Forecast by Day based on daily weights

Hi All! I'm trying to build a dashboard that shows daily forecast vs. actual sales dynamically. But we only have forecast by month. Since daily sales fluctuate based on different weekdays and holidays, i created a file that shows daily weights. Ideally, I would get my daily forecast by multiplying monthly forecast and daily weights. 

 

This is what my forecast look like:

ProductDateForecast
kc1231/1/20211000
kc1232/1/20211500
kc1233/1/20211200
we1231/1/20211300
we1232/1/20211400
we1233/1/20211500
jij1231/1/20211200
jij1232/1/20211100
jij1233/1/20211300

 

and this is what the weights are like:

DateWeekdayWeights
1/1/2021Fri3%
1/2/2021Sat6%
1/3/2021Sun4%
1/4/2021Mon2%
1/5/2021Tue3%
1/6/2021Wed3%
1/7/2021Thu3%
1/8/2021Fri4%
1/9/2021Sat5%
1/10/2021Sun5%

 

My goal is to apply the weights to my monthly forecast so that I can build a line chart that shows daily forecast and dailly sales at the same time. Also I want to see the daily forecast for each product, not just the sum. So it would look like this:

 

DateWeekdayProductDaily Forecast
1/1/2021Frikc12330
1/2/2021Satkc12360
1/3/2021Sunkc12340
1/4/2021Monkc12320
1/5/2021Tuekc12330
1/6/2021Wedkc12330
1/7/2021Thukc12330
1/8/2021Frikc12340
1/9/2021Satkc12350
1/10/2021Sunkc12350
1/1/2021Friwe12339
1/2/2021Satwe12378
1/3/2021Sunwe12352
1/4/2021Monwe12326
1/5/2021Tuewe12339
1/6/2021Wedwe12339
1/7/2021Thuwe12339
1/8/2021Friwe12352
1/9/2021Satwe12365
1/10/2021Sunwe12365

 

Thank you so much in advance!

3 REPLIES 3
lbendlin
Super User
Super User

Do you have a calendar table and is your weights table linked to it? the forecast table will likely have to stay disconnected, and you can use DAX functions to tie that information in.  Alternatively you could merge both tables in Power Query (by converting your weights dates to "beginning of month" and then joining on that field).

 

Which approach do you prefer?

Hiii! Yes I have a calendar table that links to the weights table by date. 

To convert weights date to beginning of month, are you saying something like below?

1/1/2021Fri1/1/20213%
1/2/2021Sat

1/1/2021

6%
1/3/2021Sun1/1/20214%
1/4/2021Mon1/1/20212%
1/5/2021Tue1/1/20213%
1/6/2021Wed1/1/20213%
1/7/2021Thu1/1/20213%
1/8/2021Fri1/1/20214%
1/9/2021Sat1/1/20215%
1/10/2021Sun1/1/20215%

I would love to try both approaches if possible!

More something like that

 

Date Weekday Product First Day of Month Monthly Forecast Daily Forecast
1/1/2021 Fri kc123 1/1/2021 1000 30
1/2/2021 Sat kc123 1/1/2021 1000 60
1/3/2021 Sun kc123 1/1/2021 1000 40
1/4/2021 Mon kc123 1/1/2021 1000 20
1/5/2021 Tue kc123 1/1/2021 1000 30
1/6/2021 Wed kc123 1/1/2021 1000 30

 

(You wouldn't need the last two columns as these can be pulled from the data model or be calculated.)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.