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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
AlexPjz
New Member

Highlight Weekends on Line Chart

I am looking to achieve this same result: Line Chart to highlight Weekends

 

I have a Local Date Table with Weekend identified in a calculated column as 1 if true.

Local Date Table.png

 

 

My line chart takes information from Ventas and plots it like this:

Ventas.png

 

As you can see I was trying to achieve a similar desired result by conditional formatting the values. My goal was to conditional format the markers since this way, every weekend was going to be identified but with values, not all of them show due to spacing.

 

What can I do in order to efficiently highlight weekends on my line chart?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @AlexPjz 

 

Just as the link you provide:

First of all, I create a set of sample:

vzhengdxumsft_0-1713230596584.png

Then add a measure:

MEASURE =
IF (
    WEEKDAY ( MAX ( 'Table'[Date] ) ) IN { 6, 7 },
    MAXX ( ALL ( 'Table' ), 'Table'[Value] ),
    BLANK ()
)

The next step is to add a line and stacked column chart, the result is as follow:

vzhengdxumsft_1-1713230826247.png

 

If the above one can't help you, could you please provide more raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
AlexPjz
New Member

I am not able to add values like you show since my totals are calculated from a different table which has all the separate transactions.

My date table looks like:

AlexPjz_0-1714409798009.png

 

 

Table where my individual transactions are:

AlexPjz_1-1714409890437.png

In this one I also have a column with the date named Fecha.


Another problem I see with Line and stacked column chart is that then I am no longer able to have the forecast option on PowerBI. My end result objective is similar to what you showed but would only be missing some formatting to look like this:

AlexPjz_2-1714410027240.png

 

Anonymous
Not applicable

Hi @AlexPjz 

 

Just as the link you provide:

First of all, I create a set of sample:

vzhengdxumsft_0-1713230596584.png

Then add a measure:

MEASURE =
IF (
    WEEKDAY ( MAX ( 'Table'[Date] ) ) IN { 6, 7 },
    MAXX ( ALL ( 'Table' ), 'Table'[Value] ),
    BLANK ()
)

The next step is to add a line and stacked column chart, the result is as follow:

vzhengdxumsft_1-1713230826247.png

 

If the above one can't help you, could you please provide more raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors