Forum Discussion
How to find out a date based on specific value in different column?
"Star date" column is the doctors appointment available date and "Begin time" column is the available appointment slot times. I need to find out the "date of 3rd available slot"
4 Replies
- PC2790Community Champion
Hello Tanuja_PBI ,
The requirement is not at all clear.
What logic do you want to apply while getting the 3 appointment slot.
Also, please share a sample dataset to understand the details like datatype etc.
- Tanuja_PBIRegular Visitor
Hi, here is the sample data set with available appointment slots of different doctors. The logic we need to apply is, starting from today we need to find the next third avialbility slot date irrespective of doctors.
"Star date" column is the doctors appointment available date and "Begin time" column is the available appointment slot times.
For example, from the sample data set, the Red marked box would be our 3rd available slot and Blue marked box would be our 3rd available slot date(which is required).
- AnonymousNot applicable
Assuming you are going g to Promote Headers, and use Date.FromText on that date field, then it's a matter of where you want the results. A new column? A separate query? Are we filtering to just that row? Here is the formula to get the results:
= let position = List.PositionOf(TableName[start_date], Date.From(DateTime.LocalNow()), Occurrence.First) + 2 in TableName[[start_date], [begintime]]{position}
--Nate
- AnonymousNot applicable
Hi Tanuja_PBI ,
Did you mean you want to combine date and time fields to create datetime field?
Use & combine date and time. Try this
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.