Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hey,
As an example. If I have some data on when people have checked into work.
Employee Name | Check In Time | Time Period |
Daffy Duck | 06:22:17 | ? |
Goofy | 12:56:24 | ? |
Wayne Rooney | 21:22:39 | ? |
I want to add a calculated column that works out the time period the check in falls into.
The Time Period Start and End boundaries will be based on a seperate table below.
Time Period | Time Start | Time End |
1 | 06:00:00 | 10:00:00 |
2 | 10:00:00 | 16:00:00 |
3 | 16:00:00 | 19:00:00 |
4 | 19:00:00 | 00:00:00 |
I want it set up in a way that when I update the Time Start an Time End in this table my Time Period in the first table would update.
Many thanks,
Solved! Go to Solution.
You can get a new column like this in table 2. And you can join both table on time id
Time id = maxx(filter(Table2, table1[Check In Time]>=table2[Time Start] && table1[Check In Time]<table2[Time End]),Table2[Time Period])
Also, you can get a column like , But better join two table
start time = maxx(filter(Table2, table1[Time id]=table2[Time Period]),Table2[Time Start])
Appreciate your Kudos.
You can get a new column like this in table 2. And you can join both table on time id
Time id = maxx(filter(Table2, table1[Check In Time]>=table2[Time Start] && table1[Check In Time]<table2[Time End]),Table2[Time Period])
Also, you can get a column like , But better join two table
start time = maxx(filter(Table2, table1[Time id]=table2[Time Period]),Table2[Time Start])
Appreciate your Kudos.
I did not get it completely. Please explain with an example
But you can get a time table like :https://kohera.be/blog/power-bi/how-to-create-a-time-table-in-power-bi-in-a-few-simple-steps/
Work between period :https://kohera.be/blog/power-bi/how-to-create-a-time-table-in-power-bi-in-a-few-simple-steps/
Appreciate your Kudos.
@cmcdowall not sure if I understood your question. You have a data table and you want to bring these time start and end column in your data table, correct? if that is the case, can you share how your data table looks like?
Read this post to get your answer quickly.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
User | Count |
---|---|
102 | |
91 | |
87 | |
79 | |
71 |
User | Count |
---|---|
113 | |
105 | |
101 | |
75 | |
64 |