Forum Discussion
filipeoliveira
Helper I
4 years agoDISTINCTCOUNT 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...
- 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])
amitchandak
Super User
4 years agofilipeoliveira , 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])