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

Week of Date

Hello looking for some help I have a Calendar table that I built that looks like the following below. What I need to add is a Week of Colums that Puts the Week range dates in.  Example if Work Week equals week 50 the Column would display 11/10/19 - 11/16/19

Form photo.PNG

 

 

Any help would be great

3 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

Try This

Week of = format(DATEADD('Compare Date'[Compare Date],-1*WEEKDAY('Compare Date'[Compare Date])+1,DAY),"mm/dd/yy"  & " - " & format(DATEADD('Compare Date'[Compare Date],7-1*WEEKDAY('Compare Date'[Compare Date]),DAY),"mm/dd/yy"))

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

View solution in original post

Anonymous
Not applicable

I think it might work I copy and pasted it into my table but it errored out.  I am new to this board is there a way I could send you my BI file.

Form 2.PNG

 

View solution in original post

Please change the table name and column name.

My date table is "compare date" and the column name is also "compare date".

 

In your case, it may be Date[date]

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

Try This

Week of = format(DATEADD('Compare Date'[Compare Date],-1*WEEKDAY('Compare Date'[Compare Date])+1,DAY),"mm/dd/yy"  & " - " & format(DATEADD('Compare Date'[Compare Date],7-1*WEEKDAY('Compare Date'[Compare Date]),DAY),"mm/dd/yy"))

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

Anonymous
Not applicable

I think it might work I copy and pasted it into my table but it errored out.  I am new to this board is there a way I could send you my BI file.

Form 2.PNG

 

Please change the table name and column name.

My date table is "compare date" and the column name is also "compare date".

 

In your case, it may be Date[date]

Anonymous
Not applicable

Thanks that did work relized I needed to use the right colum names.

 

Thank you, Thank you

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.

Top Solution Authors