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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
Anonymous
Not applicable

Line Chart to highlight Weekends

Hi All,

 

I'm working on a project to see the number of users that visit our website, shown as a line graph over time. I noticed that there fewer numbers that visit our site on weekends than during the week and thought this would be useful to highlight. 

 

What I am looking for is what is shared on this question (the solution however is not very clear).

 

Weekend highlighting line chart - Microsoft Power BI Community

 

abdalahmed_1-1633950096792.png

 

Ive created a separate DAX formula to highlight the weekends from weekdays. My Sat/Sun are numeric 5 and 6 respectively; give Day of week a 1 if its a weekend otherwise give a 0.

WeekDayWeekEnd = SWITCH('Contact Us Page'[Day of Week],5,1,6,1,0)

 

This is where I up to so far. Any assistance will be appreciated. 

 

abdalahmed_2-1633950578191.png

 

 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I've figured it out. 

 

  1.  I had to amend my formula to (see snipet). If the weekend (days numbered 5 or 6) then count the total number users otherwise leave blank

 

WeekDayWeekEnd = SWITCH('Contact Us Page'[Day of Week],5,SUMX('Contact Us Page','Contact Us Page'[Users]),6,SUMX('Contact Us Page','Contact Us Page'[Users]))​

 

  •  I needed to change the chart type to Line and Column Chart. Then add the abouve formula to the bar chart field.
  • A few other edits to the visualisation to make it look "pretty"

abdalahmed_0-1633952000407.png

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

I've figured it out. 

 

  1.  I had to amend my formula to (see snipet). If the weekend (days numbered 5 or 6) then count the total number users otherwise leave blank

 

WeekDayWeekEnd = SWITCH('Contact Us Page'[Day of Week],5,SUMX('Contact Us Page','Contact Us Page'[Users]),6,SUMX('Contact Us Page','Contact Us Page'[Users]))​

 

  •  I needed to change the chart type to Line and Column Chart. Then add the abouve formula to the bar chart field.
  • A few other edits to the visualisation to make it look "pretty"

abdalahmed_0-1633952000407.png

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.