In the current work, we investigated the association of anti-PD-(L)1 treatment duration to treatment outcomes in advanced melanoma and NSCLC patients. Here, CD274 is linked to melanoma.