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

Bad Date Field - Can't stop Many to Many Issue

Hello,

 

I have a table that I need to connect to a calendar table, however the only field I have that is date related is in the format "Week32 2019"

 

I have a calendar table with tons of fields, but I can't get it connected without a Many to Many connection. 

 

I've tried every thing I can think of... I have a feeling it's a simple solution. Any suggestions?

Calendar Table.PNGTable Date.PNG

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

Please convert the week to a weekend date. The following will convert it into the Weekend date.

Weektodate = date(RIGHT('Date'[Week Format],4),1,1)+(mid('Date'[Week Format],5,SEARCH(" ",'Date'[Week Format])-5 )*7)  - (WEEKDAY(date(RIGHT('Date'[Week Format],4),1,1)))

You might need a few changes if there difference in your format.

 

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

2 REPLIES 2
amitchandak
Super User
Super User

Please convert the week to a weekend date. The following will convert it into the Weekend date.

Weektodate = date(RIGHT('Date'[Week Format],4),1,1)+(mid('Date'[Week Format],5,SEARCH(" ",'Date'[Week Format])-5 )*7)  - (WEEKDAY(date(RIGHT('Date'[Week Format],4),1,1)))

You might need a few changes if there difference in your format.

 

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

@amitchandak 

 

You are a wizard! Thank you very much. 

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.