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
ghouse_peer
Post Patron
Post Patron

Week dates in axis

Hello Guys, 

 

 I have a task where i need to show the data weekly basis. I need 'week dates range' in x axis. Kindly help me how to achieve this.

I need to show week dates range as it is in pic

 

 

I have a dates table named 'Dates'.Kindly provide me the solution pls.

 

Thanks in advance.

3 REPLIES 3
amitchandak
Super User
Super User

@ghouse_peer , refer my blog.

You have create a week based on start and end date and sort that on week start date

// Monday Week
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)

///Sunday Week
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date])+1
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date])


Week Number = WEEKNUM([Date],2)
Week = if('Date'[Week Number]<10,'Date'[Year]*10 & 'Date'[Week Number],'Date'[Year]&'Date'[Week Number])
Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)
Week name = [Week Start date] & " to "& [Week End date]

 

https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...

@amitchandak  Thank you very much. Got the solution. It worked. cool.

@ghouse_peer , Also use week number without 2 for Sun to Sat

Week Number = WEEKNUM([Date]) //Sunday week

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.