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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.