Forum Discussion

filipeoliveira's avatar
4 years ago
Solved

DISTINCTCOUNT based on two rows from another column

Hi,   I'm trying to do a DISTINCTCOUNT on the ID column below, but it should count only if there are DRAFT and FINAL status values for the same ID, if there is only one status (be it draft or final...
  • amitchandak's avatar
    4 years ago

    filipeoliveira , use this measure with id

    Countx(filter(summarize(Table, Table[ID], "_1", calculate(Distinctcount(Table[Status]), filter(Table, Table[Status] in {"DRAFT","FINAL"}) )),[_1]=2),[ID])