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

Show the weekly dates on X Axis vs weeknumber

leadership has asked me to track trends and wants daily reports, and weekly totals,  I've got the data and bar graphs ready and used weeknum() to get the weekly numbers field, but I don't want the X Axis to show  13,14,15, 16,   I'd rather it how the range of the dates involved in that week, EG  week 13 is  "23 - 29 March".   I was able to show that via IF()   but the issue is when I put that column on the  X-axis it's not in the right order anymore.    

How does MS not have a weekly slicer in their date hierarchy yet? 

week dates on X axis :
weekdates.JPG

same data by Week Num

weeknumber.JPG

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

Check out Week Starting: https://community.powerbi.com/t5/Quick-Measures-Gallery/Week-Starting/m-p/391487#M123


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
v-yingjl
Community Support
Community Support

Hi @Anonymous ,

In power bi desktop, the date hierarchy contains Year, Quarter, Month and Day currently and I'm afraid there is no option about the number of week in this hierarchy unless you use weeknum() as you previous said.

Please Refer:

  1. Built-in Date Hierarchy in Power BI 
  2. Weeknum() 

In addtion, if you want to re-sort these columns, you should change the sort by column and refer the weekstart articles as @ amitchandak  and @ Greg_Deckler  provided.

 

Best Regards,
Yingjie Li

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

You should set the week order based on week no or Year - Week No

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

 

Refer in this file for the Week start date and year week no(Week)

https://www.dropbox.com/s/d9898a48e76wmvl/sales_analytics_weekWise.pbix?dl=0

Greg_Deckler
Super User
Super User

Check out Week Starting: https://community.powerbi.com/t5/Quick-Measures-Gallery/Week-Starting/m-p/391487#M123


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

thanks this seems to be similar to what I'm doing just more compact and in one step vs calculating weeknum() then doing IF() to change the text around. 

Still disappointed at MS here though.  

thanks everyone! 

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.