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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

@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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors