Forum Discussion
Anonymous
6 years agoNot applicable
remove duplicate based on specific value
I have data as shown belew id stage status 1 a complete 1 b complete 1 b not complete 2 a complete 2 b not complete I want to drop the duplicate rows based o...
- 6 years ago
Anonymous
6 years agoNot applicable
thank you it worked but is there any way to apply it with measure
camargos88
6 years agoCommunity Champion
Hi Anonymous ,
Yes,
try this code:
Measure =
VAR _qtdeStatus = CALCULATE(DISTINCTCOUNT('Table (2)'[status]); ALLEXCEPT('Table (2)'; 'Table (2)'[id]; 'Table (2)'[stage]))
RETURN IF(_qtdeStatus > 1; CALCULATE(DISTINCT('Table (2)'[status]); FILTER('Table (2)'; 'Table (2)'[status] = "Complete")); CALCULATE(DISTINCT('Table (2)'[status])))
Ricardo