Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi gurus,
Due to data is not 'clean' enough, I experienced data that has these fields. Please see attached
Bus_ID act as as unique of individual bus
Bus Name is the name of the bus
Date is the date the bus starts it journey
Bus_Passenge is the amount of passenger the bus take
As you can see from the table, Bus_ID 411 and 800 have duplicate record. Due to the user wrong input on the Bus_ID, it count it as two recrods. Therefore when i try to find the total passenger, it added all even though it is suppose to be one record(400) for bus ID 411.
Is there anyway I can do the sum of the passenger by having one record for each bus _ID. It only takes in record that has the earliest date.
Thanks
Message was edited by: Bennn Bennn New file
You missed the new attachment. If you meant the latest date, try :Sum(Aggr((FirstSortedValue(Bus_Passenger,-Date)),Bus_ID))
Note: a '-' symbol before Date changes the sort order.