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
FVal
Helper I
Helper I

Axis - use date per Week

Hi experts,

 

We have to present in some reportds data structured by week number or similar.

 

I tried to use bins, set 7 days and use it as such, but it looks a bit awkward and also I can't get the bin name changed to week name.

 

Is there another way of dividind a date field into weeks of the year and use it in the Axis part?

 

Also, is this a generic thing, to have the week missing but still have the Day, Month, Year or is it something that can be enabled in the settings?

 

Thank you,

V.

1 ACCEPTED SOLUTION

@FVal add column with following expression:

x = "Week " & FORMAT( WEEKNUM( 'Calendar'[Date] ), "0#" )

 

Would appreciate Kudos 🙂 if my solution helped.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

9 REPLIES 9
parry2k
Super User
Super User

@FVal you can add another column in the calendar table. Do you want start of the week or end of the week date? When the week starts? Sunday/Monday?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi Parry,

 

Thank you for your quick reply. I would need to have it same as the calendar week number, as example below:

 

Week 01December 30, 2019January 5, 2020
Week 02January 6, 2020January 12, 2020
Week 03January 13, 2020January 19, 2020
Week 04January 20, 2020January 26, 2020
Week 05January 27, 2020February 2, 2020
Week 06February 3, 2020February 9, 2020
Week 07February 10, 2020February 16, 2020
Week 08February 17, 2020February 23, 2020
Week 09February 24, 2020March 1, 2020
Week 10March 2, 2020March 8, 2020
Week 11March 9, 2020March 15, 2020
Week 12March 16, 2020March 22, 2020
Week 13March 23, 2020March 29, 2020
Week 14March 30, 2020April 5, 2020
Week 15April 6, 2020April 12, 2020

etc.

 

Best Regards,

V. 

@FVal add column with following expression:

x = "Week " & FORMAT( WEEKNUM( 'Calendar'[Date] ), "0#" )

 

Would appreciate Kudos 🙂 if my solution helped.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Great, will use it as described. Instead of Calendar [Date] I could use it for any date fields I need, correct?

 

Best Regards,

V.

Hi,

 

So, used, it does the magic, so thank you, still, a little bit of help is required, as, for some reason, the order is strange:

 

 

W5, W3, W4, W7, W8, W10, W11,W2...

How can it be made to show the correct order?

 

Best Regards,

V.

@FVal you should be getting W01, W02 W03....

 

and make sure your visual is sorted correct, click on top right corner (3 dots) and check the sort order, that it is sorted by week column

 

Would appreciate Kudos 🙂 if my solution helped.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Yey, that solved the order, only Week 1 is still missing (it was not displayed at all).

@FVal do you have data for week 1, not sure why it will be missing?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

sorted now, it was due to another filter, showing data after 01.01.2020, while week 1 has few days in 2019.

 

Appreciate your support,

Have a nice day

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.