Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Measure Value

Hi All,   I've filtered a column in my report using the below measure:   Electric Deals = CALCULATE(COUNT(Deals[TypeName]), FILTER(Deals,Deals[TypeName]= "Electric"))   If there a possibility...
  • amitchandak's avatar
    5 years ago

    Anonymous , Add +0 to the measure

     

    Electric Deals = CALCULATE(COUNT(Deals[TypeName]), FILTER(Deals,Deals[TypeName]= "Electric")) +0

  • AlB's avatar
    5 years ago

    Hi Anonymous 

    adding a zero, as already pointed out, is the most direct solution. Another option is:

    Electric Deals =
    VAR aux_ =
        CALCULATE (
            COUNT ( Deals[TypeName] ),
            FILTER ( Deals, Deals[TypeName] = "Electric" )
        )
    RETURN
        COALESCE ( aux_, 0 )

     

    Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

    Contact me privately for support with any larger-scale BI needs, tutoring, etc.

    Cheers