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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
WinYit
Frequent Visitor

Try to get work hour and break hour from a single line

Hi, I have a problem that I cant find works hour and break hour in my data. I only found this line: 

FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR

 

Now I might think that this line can get the works hour and breaks hour but i dont know how to solve it. 

2. Either can or cannot, can i separate this line to Monday, Tuesday,..., Sunday?

4 REPLIES 4
sturlaws
Resident Rockstar
Resident Rockstar

Hi, @WinYit,

 

you have not provided much context here, but assuming you are working in power bi desktop in import mode, you can solve this with power query.

Find the transform button:

sturlaws_0-1670449861682.pngCheers,
Sturla

If this post helps, then please consider Accepting it as the solution. Kudos are nice too.


Split the sting first by semi-colon, then by comma:

sturlaws_1-1670449926906.png

 

 

Then play around with the pivot-functions to change the columns to rows

sturlaws_2-1670450098811.png

 

 

 




I think its cant help me. I have two questions.

1. can I get work hour and break hour from the recurrence pattern: FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR

2. can I get Day(Monday, Tuesday, Wednesday, Thursday, Friday, Saturday,Sunday) from the recurrence pattern:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR

WinYit
Frequent Visitor

WinYit_0-1670468007201.png

This is the work hour and break hour that i need 

If this is the data you have:

FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR

 

you obviously cannot get work hours and break hours directly from this, as it does not contain any information about this. 

If you can assume a fixed number of hours each day, you can use the method I described, using power query, and adding a few steps to calculate the number of hours.

Look at the attached file:

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.