Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Can someone assist with the below please?
Sample data :
Trip | Delivery Point | Delivery Status |
---|---|---|
001 | Derby | OnTime |
001 | Nottingham | Late |
002 | Nottingham | OnTime |
002 | Birmingham | Late |
002 | Derby | OnTime |
003 | Birmingham | OnTime |
003 | Derby | Late |
I need to somehow show how many Distinct Delivery Point to a Trip were on OnTime or Late..
E.g. There has been a total of 7 Departures - 4 of them were OnTime and 3 of them were Late
Derby had 2 OnTime for 2 trips and 1 Late for 1 Trip.
The Idea is so i can show this as a percentage - Count Ontime by Delivery Point / Total Distinct Trips
Hope this makes sense!!
on time : =count({<[Delivery Status]={'OnTime'}>}Trip)/count(distinct Trip)
Late : =count({<[Delivery Status]=-{'OnTime'}>}Trip)/count(distinct Trip)
No Visits : count(distinct Trip)
result:
U want the count by trip or delivery pioint?
Could u create a table with the output u want as u've done for the input data?
Location | OnTime % | Late % |
---|---|---|
Derby | 75% | 25% |
Birmingham | 60% | 40% |
Manchester | 70% | 30% |
I need to show how many delivery points are in 1 trip and its percentage by location.
Still can't figure out how Derby is 75% OnTime ?
wouldn't this be more "accurate"? Mayube i'm missing sthing!
Sorry-
Location | No. Visits | OnTime % | Late % |
---|---|---|---|
Nottingham | 2 | 50% | 50% |
Derby | 3 | 67% | 33% |
Birmingham | 2 | 50% | 50% |
on time : =count({<[Delivery Status]={'OnTime'}>}Trip)/count(distinct Trip)
Late : =count({<[Delivery Status]=-{'OnTime'}>}Trip)/count(distinct Trip)
No Visits : count(distinct Trip)
result:
How come my percentages are showing way out?
what dimension and measure u're using?
It's not clear in the image
I had to use distinct twice as the data I'm using had more that 1 trip number.
I used
=count({<[DeliveryStatusByBookingTime]={'OnTime'}>}Distinct Trip)/count(distinct Trip)