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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
AhmedT001
Frequent Visitor

Ignore Weekend in Forecast

Hi,

 

I've created a Line Chart with a Forecast using some data that is pulled out directly from our IBM dB2 Database. The image below is a snippet of the line chart, with sensitive data blocked out. 

 

Screenshot0.PNG

 

However this line chart takes into account weekends, where there is no activity, hence the straight horizontal lines at the bottom. Within my Dataset, we have Invoices against the date they are done, in the format of DD/MM/YYYY. 

 

How do I go about only using Weekdays in my Forecast/Line chart? I gather I need to do something in PowerQuery and create a custom column or something but beyond that, I don't really know what to do.

 

Can anyone help me please? 

 

Thanks for any help. 

 

 

1 ACCEPTED SOLUTION
AhmedT001
Frequent Visitor

I managed to figure it out by doing lots of reading/youtube/googling the fix was as follows.

 

1) Go to Transform Data.

2) In the Transcation Table, click on Add Column, then Custom Column

3) Give it a name, say Weekend for example.

4) In the Custom Column Formula section, input the following (without the quotes):

"if Date.DayOfWeek([INVOICE_DATE], Day.Monday) > 4
then
"Weekend"
else
"Weekday""

5) Click Ok

6) Click Close&Apply

7) Add new Weekend field as a Filter on this page

😎Select Weekday

9) Problem solved :). 

View solution in original post

5 REPLIES 5
AhmedT001
Frequent Visitor

I managed to figure it out by doing lots of reading/youtube/googling the fix was as follows.

 

1) Go to Transform Data.

2) In the Transcation Table, click on Add Column, then Custom Column

3) Give it a name, say Weekend for example.

4) In the Custom Column Formula section, input the following (without the quotes):

"if Date.DayOfWeek([INVOICE_DATE], Day.Monday) > 4
then
"Weekend"
else
"Weekday""

5) Click Ok

6) Click Close&Apply

7) Add new Weekend field as a Filter on this page

😎Select Weekday

9) Problem solved :). 

mickey64
Super User
Super User

For your reference.

"Filter pane"

mickey64_0-1726072395440.png

 

This didn't work as it ended up removing the forecast. I've posted what the fix was, for me anyway. 

AnkitKukreja
Super User
Super User

Hi! @AhmedT001 

 

I think you are on right track, if you can have an identifier for weekend then you can exclude that from your visual by using page level/ visual level filter to avoid weekends, hope this helps, if not please share the sample data to reproduce the same.

 

 

For Power BI trainings or support dm or reach out to me on LinkedIn.
If my response has successfully addressed your question or concern, I kindly request that you mark this post as resolved. Additionally, if you found my assistance helpful, a thumbs-up would be greatly appreciated.

Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904

Yes this is the route I had to go down, I've posted my solution as well. 

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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