Calculate cluster ID based on dataset names