Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

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...
  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    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
        )
    )