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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
lcasey
Post Prodigy
Post Prodigy

Friendly Week Names

Hello,

 

In Excel it is real easy to create friendly week names such as:

 

From Jul 9 to Jul 15
From Jul 16 to Jul 22
From Jul 30 to Aug 5
From Aug 6 to Aug 12
From Aug 13 to Aug 19
From Aug 20 to Aug 26
From Aug 27 to Sep 2
From Sep 3 to Sep 9

 

Is there any way to do this in Power BI from a Date field?

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @lcasey

In Queries Editor,

Add custom columns

weeknum=Date.WeekOfYear([date], Day.Monday)

start of week=Date.StartOfWeek([date], Day.Monday)

end of week=Date.EndOfWeek([date], Day.Monday)

 

Click on column [date] column, select "Add column"->Date, insert "Name of Month"

Click on column [start of week] column, select "Add column"->Date, insert "Day"

Click on column [end of week] column, select "Add column"->Date, insert "Day"

 

Click on column [Month Name] and [Day], select "Add column"->"Merge columns"  (separator:space)

Click on column [Month Name] and [Day.1], select "Add column"->"Merge columns"  (separator:space)

 

Add a custom column

Custom=Text.Combine({"From", [Merged],"to",[Merged.1]}, " ")

7.png

 

 

Then ypu could remove other columns, only keep the last column

 

Best Regards

Maggie

 

 

 

View solution in original post

10 REPLIES 10
v-juanli-msft
Community Support
Community Support

Hi @lcasey

In Queries Editor,

Add custom columns

weeknum=Date.WeekOfYear([date], Day.Monday)

start of week=Date.StartOfWeek([date], Day.Monday)

end of week=Date.EndOfWeek([date], Day.Monday)

 

Click on column [date] column, select "Add column"->Date, insert "Name of Month"

Click on column [start of week] column, select "Add column"->Date, insert "Day"

Click on column [end of week] column, select "Add column"->Date, insert "Day"

 

Click on column [Month Name] and [Day], select "Add column"->"Merge columns"  (separator:space)

Click on column [Month Name] and [Day.1], select "Add column"->"Merge columns"  (separator:space)

 

Add a custom column

Custom=Text.Combine({"From", [Merged],"to",[Merged.1]}, " ")

7.png

 

 

Then ypu could remove other columns, only keep the last column

 

Best Regards

Maggie

 

 

 

This actually does not work...

 

Look at the October dates.  It should be from October 29th to November 3rd 

 

10.png

I think I need to add Month Name for week 2 also and then I can use both month names in the query.  That should resolve it.

Ok all I needed to do was create a month name for Week 2, then Merge Month 2 and week 2 together which fixed it:

 

9.png

There is an issue with this.

 

Look at how the dates for October show:

 

03.png

There is no option to insert column.  

 

Where do you add colum?  I selected date but there is no insert option.  

 

01.png

Ok got it---- Here is a picture in case anyone needs :

 

02.png

Thank you!

 

This is exactly what I was trying to do!

HotChilli
Super User
Super User

It's done pretty much the same way, usually with a Date table and WEEKNUM function

True, I do understanbd that, but here is what I get when using weekno function:

 

1

2

3

4

5

6

7

8

 

What I need is

 

Jan 1 - Jan 7

Jan 8 - Jan 14

Jan 15 - Jan 21

Jan 22 - Jan 28

 

Rather than the numbers.

 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.