Forum Discussion
Anonymous
8 years agoNot applicable
Count 1 column with filter
Hi all, So ive got the folowing challenge as a newbie: Asset Damage Car1 YES Car1 YES Car2 NO Car2 NO Car2 Yes Etc. Etc. this is a simplified version of the da...
- 8 years ago
Hi Anonymous
This measure would do the job hopefully
DistinctCars = COUNTROWS ( FILTER ( SUMMARIZE ( Cars, Cars[Asset], "Count", COUNT ( Cars[Damage] ) - CALCULATE ( COUNT ( Cars[Damage] ), Cars[Damage] = "Yes" ) ), [Count] = 0 ) )
Anonymous
8 years agoNot applicable
Hi Greg_Deckler,
Thank you but this also counts the YES value with car2. I only want to distinct count if there arent any "no" values with a car.
Is there a solution for that?
Greg_Deckler
8 years agoCommunity Champion
Sorry, missed that.
Add this column:
Column = IF(MINX(FILTER(Cars,Cars[Asset]=EARLIER(Cars[Asset])),Cars[Damage])=MAXX(FILTER(Cars,Cars[Asset]=EARLIER(Cars[Asset])),Cars[Damage]),1,0)
And then change your measure to:
Measure = CALCULATE(DISTINCTCOUNT(Cars[Asset]),FILTER(Cars,Cars[Damage]="YES"&&Cars[Column]=1))
- Greg_Deckler8 years agoCommunity Champion
Zubair_Muhammad's measure seems to work as well!
- Anonymous8 years agoNot applicable
Thank you both for the invested time! Greg_Deckler Zubair_Muhammad
They both work, i preffered the solution without the calculated column.
where would the users be without your help!