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.
Hello everyone I am trying to find a way to find how many deliveries are within a certain time window. Like i need a way to identify what truck arrived before 6am of the following day, after 6am but before 12nn, after 12nn but before 6pm and 6pm onwards. The starting date is the order_date.
Solved! Go to Solution.
Hi @ranz_vincent ,
Add a new custom column like this:
arrivalDayWindow =
if [date_arrived_to_store] = [order_date] then "Same Day"
else if [date_arrived_to_store] = Date.AddDays([order_date], 1) then "Next Day"
else "Other"
Then another one like this:
arrivalTimeWindow =
if [time_arrived_to_store] < #time(6, 0 ,0) then "Before 0600"
else if [time_arrived_to_store] >= #time(6, 0 ,0)
and [time_arrived_to_store] < #time(12, 0 ,0) then "0600-1200"
else if [time_arrived_to_store] >= #time(12, 0 ,0)
and [time_arrived_to_store] < #time(18, 0 ,0) then "1200-1800"
else "After 1800"
Between these two columns you should be able to make counts of any scenario you need.
Pete
Proud to be a Datanaut!
Hi @ranz_vincent ,
Add a new custom column like this:
arrivalDayWindow =
if [date_arrived_to_store] = [order_date] then "Same Day"
else if [date_arrived_to_store] = Date.AddDays([order_date], 1) then "Next Day"
else "Other"
Then another one like this:
arrivalTimeWindow =
if [time_arrived_to_store] < #time(6, 0 ,0) then "Before 0600"
else if [time_arrived_to_store] >= #time(6, 0 ,0)
and [time_arrived_to_store] < #time(12, 0 ,0) then "0600-1200"
else if [time_arrived_to_store] >= #time(12, 0 ,0)
and [time_arrived_to_store] < #time(18, 0 ,0) then "1200-1800"
else "After 1800"
Between these two columns you should be able to make counts of any scenario you need.
Pete
Proud to be a Datanaut!
Just finished trying this and it worked perfectly. Thanks for the help
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.