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.
I would like to know if anybody have done this before, or how youd do it 🙂
I have a normal date table who have a different day on each row.
I also have a Timetable who have a different minute on each roe and a dateID to connect the 2 date/time tables.
I would like to add a team# on the time/date relation.
There`s 4 teams A,B,C and D who work on a 7/7 Day and Night schedule.
If i know that team A start next wednesday (26-12-2018 for example) at Day and B at Night
AND C will start at Day and D at night on 02-01-2019.
I also have to say that day shift starts at 7am and end at 7pm and night shift start at 7pm and end at 7am.
How would you right the formula to scroll it down on my date/time table ?
Thank you very much.
Hi @Anonymous,
I'd like some sample to help us clarify your requirement. It is hard to code formula without any sample data.(table structure and relationship)
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
This is my 2 tables : there is no relation between de two of them.
Hi @Anonymous,
I create two bridge table to link #team table with date and time.
#Team table:
Date Bridge = SELECTCOLUMNS ( FILTER ( CROSSJOIN ( '#Team', DateTable ), [Date] >= [StartDate] && [Date] <= [EndDate] ), "Team", [Index], "Date", [Date] ) Time Bridge = SELECTCOLUMNS ( FILTER ( CROSSJOIN ( '#Team', TimeTable ), IF ( [StartTime] <= [EndTime], [Time] >= [StartTime] && [Time] <= [EndTime], [Time] >= [StartTime] && [Time]<=TIME(0,0,0) || [Time] <= [EndTime]&& [Time]>=TIME(0,0,0) ) ), "Team", [Index], "Time", [Time] )
Relationship:
Visuals:
Regards,
Xiaoxin Sheng
Thank you very much for your code,
How would you code it to be running all over the year and perpetual.
I mean the team 1,2 & 3,4 will continue to alternate over the year ?
Thank you, olbom1
HI @Anonymous,
Actually, after I create expand bridge tables and link them. Original table record can be mapping with detail records (data range is defined by multiple columns in same row).
When you use date/time tables with original table fields, it will auto summarize records based on relationship.
I attached sample pbix file below.
Regards,
Xiaoxin Sheng
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
98 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |