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

Modify date format // Create column with working days

Hello everyone,

 

Firts of all, please pardon me for my approximative english 😉

 

I have 2 issues concerning a date :

 

1) The dates are downloaded from an SQL server. They are in the following format "20190711" (here, for July the 11th of 2019" and I would like to change it into a common form such as 11/07/2019. I tried with "column form example" and it doesn't work. How can I do this ?

 

2) After resolving the first issue i'd like to create a column based on the data of 2 others : Purchase Order Date and Entry Date which represent respectively the date at which we received the order and the date on which we entered this order in our system. I would like to write "OK" if the entry has been done within 2 working days and "NON OK" if the entry has been done in more than 2 days. The issue is the non working days (saturday and sunday). How can i resolve these problems ? 

 

 

Thanks for helping 🙂

 

1 ACCEPTED SOLUTION
tex628
Community Champion
Community Champion

1.) 

Column = LEFT(Table2[Column1] , 4 ) & "-" & RIGHT(LEFT(Table2[Column1] , 6),2) & "-" & RIGHT(Table2[Column1] , 2)

2.) 
Calculatieng the difference between two dates where you exclude weekends is abit more complicated. Start by creating a calendartable and using the weekday() syntax there to indentify which days that are weekends. 


Connect on LinkedIn

View solution in original post

1 REPLY 1
tex628
Community Champion
Community Champion

1.) 

Column = LEFT(Table2[Column1] , 4 ) & "-" & RIGHT(LEFT(Table2[Column1] , 6),2) & "-" & RIGHT(Table2[Column1] , 2)

2.) 
Calculatieng the difference between two dates where you exclude weekends is abit more complicated. Start by creating a calendartable and using the weekday() syntax there to indentify which days that are weekends. 


Connect on LinkedIn

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.