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

Getting Weeks in dates instead of week numbers

I have a report where we need to measure weekly.  However, I can only get BI to do week numbers not dates of that assigned week.

 

Example: Week 10 instead of 03/10/20 and so on.weekly.JPG

1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

You may create a calendar table,  and create WeekNum column in it, then create relationship with your fact data table.

 

Table: Calendar=CALENDARAUTO()

Column: WeekNum = "Week"& WEEKNUM(Calendar[Date])

 

Then you may put the columns Calendar[WeekNum] and Calendar[Date] into X axis box of chart visual one by one.  If you need to see Week Number contains which related dates, then click drill up and drill down options.

105.png106.png

Best Regards,

Amy 

 

Community Support Team _ Amy

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

View solution in original post

4 REPLIES 4
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

You may create a calendar table,  and create WeekNum column in it, then create relationship with your fact data table.

 

Table: Calendar=CALENDARAUTO()

Column: WeekNum = "Week"& WEEKNUM(Calendar[Date])

 

Then you may put the columns Calendar[WeekNum] and Calendar[Date] into X axis box of chart visual one by one.  If you need to see Week Number contains which related dates, then click drill up and drill down options.

105.png106.png

Best Regards,

Amy 

 

Community Support Team _ Amy

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

A little new to this, so I am a little curious, why would one not simply create a New Group on the date, with a Bin Size of 7 days?

 

I tried this out and it seemed to work out ok, giving me a summary of data for the week range. 

 

Capture.PNG

Anonymous
Not applicable

This is awesome but I'm struggling with geting it to work with the visual I'm using.

 

Can you share a screenshot of how you are designating the axis's with your DAX ?

TomMartens
Super User
Super User

Hey @Anonymous ,

 

this is simply because is a range, for it's not possible to have an axis label that looks like this: From weekstart - to weekend.

 

Nevertheless, you can consider creating a new column inside your table that determines the start day of the week or the end date of the week.

This thread provides a simple solution for this, then you can use this column as the axis label:
https://community.powerbi.com/t5/Desktop/Week-commencing-in-DAX/m-p/241304#M107084

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

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.