Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good day!
Please help find optimal solution.
I have data - drivers delivers documents to different locations. To some locations may be delivered several document.
I need to count, how many locations were visited by driver each month.
I use construction:
LOAD
Driver_ID,
Delivery_Date,
COUNT (Location_Code) AS Count_Delivery_Points
GROUP BY
Driver_ID,
Delivery_Date;
But I guess, this construction counts repeated locations, when several documents were delivered to same location.
Can you please tell me, how to cunt only unique values?
Thank you in advance!
Try this,
count(distinct Location_Code)
you could use the below expressions in a chart object:
dimension: Driver_ID
measure : count( distinct Location_Code )
using a simple script like this:
LOAD
Driver_ID,
Delivery_Date,
Location_Code
FROM ....
Dear ,
Try
LOAD
Driver_ID,
Delivery_Date,
COUNT (distinct Location_Code) AS Count_Delivery_Points
GROUP BY
Driver_ID,
Delivery_Date;