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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
EnrichedUser
Helper III
Helper III

24 Hour Gannt Chart Matrix

Hi All, 

 

I am looking to make a visual the show when each person did a certain task. 

 

I have two tables. The first is [ActivitySheet]

ActivitySheetDateUserIDStartTime2EndTime2TransactionType
4/26/2021IGARCIA7:53:00 AM8:41:00 AMORD.PICK
4/26/2021IGARCIA8:41:00 AM8:41:00 AMOTHER
4/26/2021IGARCIA8:41:00 AM8:42:00 AMOTHER
4/26/2021IGARCIA8:42:00 AM10:50:00 AMORD.PICK
4/26/2021IGARCIA10:50:00 AM1:18:00 PMWHSE.PICK
4/26/2021IGARCIA1:18:00 PM2:58:00 PMORD.PICK
4/26/2021IGARCIA2:58:00 PM3:01:00 PMORD.PICK

 

The secondtable is [TimeTable].

TimeTable is in a relationship with [ActivitySheet] on 'TimeTable'[Time] One to 'ActivitySheet'[Startime2]' Many

TimeHourMinuteHour NumberNext HourPeriodSortTimeKey10Min
8:04:00 AM8:00:00 AM489:00:00 AM28040
8:05:00 AM8:00:00 AM589:00:00 AM28050
8:06:00 AM8:00:00 AM689:00:00 AM28060
8:07:00 AM8:00:00 AM789:00:00 AM28070
8:08:00 AM8:00:00 AM889:00:00 AM28080
8:09:00 AM8:00:00 AM989:00:00 AM28090
8:10:00 AM8:00:00 AM1089:00:00 AM281010
8:11:00 AM8:00:00 AM1189:00:00 AM281110

 

Current:

EnrichedUser_0-1619624697328.png

 

Expected Output:

EnrichedUser_1-1619625211711.png

 

Notes:

The idea is that if the StartTime2 >= TimeTable[Time] && EndTime2 <= TimeTable[Time] then place a 1 for that transaction. 

 

 The 10Min column is defined by

10Min = FLOOR(TimeTable[Minute],10)

 

 

7 REPLIES 7
EnrichedUser
Helper III
Helper III

    GENERATE(
        ActivitySheet,
        FILTER(TimeTable,
            TimeTable[Time] >= ActivitySheet[StartTime2] && 
            TimeTable[Time] <= ActivitySheet[EndTime2]))
EnrichedUser
Helper III
Helper III

I think maybe there is a way to make a virtual table using crossjoin to add all the times from [TimeTable] to the [activitysheet] where the TimeTable Value is between the start and end time. 

v-jingzhang
Community Support
Community Support

Hi @EnrichedUser 

I made some transformations to the table in Power Query Editor. You could see specific steps in the attached pbix as well as the measures.

043003.jpg

Hope this helps.

Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

@v-jingzhang Thanks for taking a look. I went through your file and saw the working time column you added in power query and see how it works. I dont think it will work well for my application since that activity sheet has upwards on 1mm rows as is. 

@EnrichedUser I know it's not perfect as it brings too much data into the table and adds a lot of rows. There may be some measure could deal with it. I will try to work it out but I'm not sure if I'm able to. 

v-jingzhang
Community Support
Community Support

Hi @EnrichedUser 

 

It seems your request is similar to the Gantt Chart in this blog (Think inside the box - Custom visuals using Standard Visuals) but more complicated. I haven't worked out how to write the correct measure that works. According to your sample data, a person may work for the same task at multiple time periods in a day, right? 

 

Regards,
Community Support Team _ Jing

@v-jingzhang That is correct, there will likely be overlap between time and task. 

 

I also took a look at the link but I havent been able to make much progress. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.