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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

column based on weeks

Hello everyone, 

I have a date column in my data source which contains information about Year, Month, Quarter and Day. 

 

I want to build a column chart which the axis is as shown in the picture below. Can anyone tell me how can I create such an axis?

 

q.PNG

1 ACCEPTED SOLUTION

@Anonymous  

Weekend = 'Date'[Date]-MOD('Date'[Date]-1,7)+5
This gives you a week ending on Friday, adjusting the above inputs would provide you what you need.

Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

View solution in original post

4 REPLIES 4
Seth_C_Bauer
Community Champion
Community Champion

@Anonymous You can create a calculated column. -> 

MonthDay = FORMAT([Date],"MMMM dd")

Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG
Anonymous
Not applicable

@Seth_C_Bauer 

Thank you for your reply. I used the formula you mentioned, but what I receive is shown in the picture. It is showing every day of the month, but what I want is that the width of the column to be 7 days, as shown in the picture in the post. q.PNG

@Anonymous  

Weekend = 'Date'[Date]-MOD('Date'[Date]-1,7)+5
This gives you a week ending on Friday, adjusting the above inputs would provide you what you need.

Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG
Anonymous
Not applicable

My final formula looks like this:

MonthDay = FORMAT('Date'[Date]-MOD('Date'[Date]-1,7)+5,"MMMM dd")

 

and for now, it works perfectly 🙂

 

Thank you @Seth_C_Bauer 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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