Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Update a table with values from another table

I have a table of dates and timeslots built entirely in Power Query:

 

 

The timeslots are currently 30m long just to make it easier to visulaise - eventually these will be 1 minute if feasible. 

 

I also pull in a .csv file with the following structure:

 

The .csv file represents periods when a certain condition was true (the PERIOD and MONTH column are superfluous).

 

There will be one row per period and there can be multiple periods on any given date.

 

The aim is to produce somelthing like a Gannt-chart as per this post - https://community.fabric.microsoft.com/t5/Desktop/Calculate-subtotal-rows-by-column/m-p/3268562#M1095530 but that still has multiple row per day if there were multiple periods on that date. 

 

How can I, using either Power Query or DAX, update the values in my timeslot table to be a '1' if the condition was true for any part of that timeslot?

Alternatively, if there is some way to simply build a timeslot table with 0 and 1 directly from my .csv file, that would be good.