New Member
Pivot Tables Quick Start
Excel Tables
Dashboards
Power Query
Power Pivot
August 16, 2021
Hello Everyone,
My data set has a list of dates on which specific diet orders stopped and started. Presumably, if there are gaps in the dates (if the dates are not contiguous), those gaps represent times when the patient was not in the hospital. Is there a way to group these dates by hospitalization? I have a column for the diet order and a column for the start and stop dates for that diet order.
Could I use the firstdate and lastdate in Power Pivot to help me accomplish this?
July 16, 2010
Hi Charles,
I'd use Power Query to split the date and time components into separate columns, just in case there is a minute or two difference from one date-time to the next. Then you can use this technique to reference the next row in Power Query (use option 2) to see if the dates are the same from one row to the next.
See example file attached. Note: you didn't give an example of your desired result, so I have only taken this so far. In future, please share a sample Excel file to save us having to manually recreate your data.
Mynda
1 Guest(s)