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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Pricey79
Helper V
Helper V

x Axis with two dates help please

Hello, I was hoping someone could please help me.

 

I have a stacked column chart and the x axis is currently set to week. What I would like is for the axis to show week number and the current date, as some people like week numbers and some like the actual date.

I have the below date query , but I cant work out how to show both on the axis, could anyone please help?

Thank you

Pricey79_0-1629108282677.png

 

 

1 ACCEPTED SOLUTION

Here is a column expression that shows one way to do it.  You can replace with your date column, and adjust the text as desired (or delete it).

 

WN and EOW = var wn = WEEKNUM('Date'[Date])
var eow = 'Date'[Date] + 7 - WEEKDAY('Date'[Date])
return "WN " & wn & " EOW - " & eow

Pat




Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

4 REPLIES 4
mahoneypat
Microsoft Employee
Microsoft Employee

Two ways you could approach this.  You could create a column in your date table that concatenates the Week Number and Date start/end for that week as text, and then use that column in your visual.  Or you could create 2 similar visuals (one with week # and one with dates), and use buttons/bookmarks to show/hide based on user preference.

 

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


@mahoneypat  Thank you for your time. Apologies but how would I do this?

''that concatenates the Week Number and Date start/end for that week as text''

Here is a column expression that shows one way to do it.  You can replace with your date column, and adjust the text as desired (or delete it).

 

WN and EOW = var wn = WEEKNUM('Date'[Date])
var eow = 'Date'[Date] + 7 - WEEKDAY('Date'[Date])
return "WN " & wn & " EOW - " & eow

Pat




Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


@mahoneypat   Thank you very much sir. Much appreciated.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors