Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello..
Good afternoon
I'm new to power bi.
I hope someone can help me with this.
I have two tables. the first is the computer log table
TimeStart | TimeEnd | Eqmt |
18/03/2020 7:30:00 | 18/03/2020 15:00:00 | S1 |
and second is the login of employees to the team
TimeStamp_Login | Employee | Eqmt |
18/03/2020 7:30:00 | A | S1 |
18/03/2020 9:30:00 | A | S1 |
18/03/2020 9:40:00 | B | S1 |
18/03/2020 13:00:00 | A | S1 |
18/03/2020 14:00:00 | C | S1 |
I want to combine those tables into a table as below screenshot shown
TimeStart | TimeEnd | Eqmt | Employee |
18/03/2020 7:30:00 | 18/03/2020 9:40:00 | S1 | A |
18/03/2020 9:40:00 | 18/03/2020 13:00:00 | S1 | B |
18/03/2020 13:00:00 | 18/03/2020 14:00:00 | S1 | A |
18/03/2020 14:00:00 | 18/03/2020 15:00:00 | S1 | C |
It would be great if someone can suggest how I can accomplish this.
Thank you
@dading , try a new table like
summarize(calculatetable(table2,table2[TimeStamp_Login]>=min(Table1[start_time]) && table2[TimeStamp_Login]>=max(Table1[end_time])
&& table2[Eqmt]>=min(Table1[Eqmt])),table2[Employee],table2[Eqmt],Table1[start_time],Table1[end_time])
@dading , I forget to put filter
try
summarize(calculatetable(table2,filter(table2,table2[TimeStamp_Login]>=min(Table1[start_time]) && table2[TimeStamp_Login]>=max(Table1[end_time])
&& table2[Eqmt]>=min(Table1[Eqmt]))),table2[Employee],table2[Eqmt],Table1[start_time],Table1[end_time])
@dading , I got it like this. But I am not able get the end time logic, can you explain that
Table = SUMMARIZE(CALCULATETABLE(Table2,filter(table1,Table1[TimeStart]<=max(Table2[TimeStamp_Login]) && Table1[TimeEnd]>=max(Table2[TimeStamp_Login]))),Table2[Employee],Table1[TimeEnd],Table2[TimeStamp_Login],Table1[TimeStart],Table1[Eqmt])
@dading ,
You have to create relationship between these two table on "Eqmt" of both the tables.
Then put all required columns in table visuals.
Don't forget to give thumbs up 👍 and accept this as a solution if it helped you.
User | Count |
---|---|
98 | |
90 | |
84 | |
71 | |
67 |
User | Count |
---|---|
114 | |
103 | |
100 | |
72 | |
64 |