Forum Discussion

ConnorH's avatar
ConnorH
Microsoft Employee
6 years ago

Cleaning Date Data

Hey all, 

 

I have been trying to figure out a way to solve this date issue I am running into with my data mess. So an example is we have 2 years worth of calender data. In one day there should not be overlapping time frames. 

Example:

SubjectStart DateStart TimeEnd DateEnd Time
Tentatively available7/21/20199:00 AM 7/21/201910:30 AM
call sheet  7/21/201911:00 AM 7/21/20194:00 PM
Assesories 7/21/20193:00 PM 7/21/20195:00 PM
Maintanance 7/21/20195:00 PM 7/21/2019 5:30 PM

 

So this could be an example of one days date data we pull. Now I am going to show a table of what my goal is:

 

SubjectStart DateStart TimeEnd DateEnd Date
Tentatively available7/21/20199:00 AM 7/21/201910:30 AM
call sheet  7/21/201911:00 AM 7/21/20194:00 PM
Assesories 7/21/20194:00 PM 7/21/20195:00 PM
Maintanance 7/21/20195:00 PM 7/21/2019 5:30 PM

 

So, basically there can not be overlapping time frames for anyday of data. Also, there is a rank for these subjects. Meaning if a call sheet has a time interference with another subject, lets say assesories due to this example, then the call sheet holds the interfered time within its start time and end time. 

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable
    This is not a DAX problem. It's a task for Power Query. Also, saying that there are ranks of importance for the subjects without giving exact rules is not enough to try to even think about a solution.

    Best
    D