Forum Discussion

PBrainNWH's avatar
PBrainNWH
Icon for Helper II rankHelper II
2 years ago
Solved

Calculation help (if two columns are not 0 then count)

I'm trying to get a count of records where both FY23 Donations and FY24 Donation <>0, but my calc keeps returning (blank). CALC: rReturned in FY2024 = CALCULATE(     DISTINCTCOUNT('Opportuni...
  • DataNinja777's avatar
    2 years ago

    Hi PBrainNWH ,

     

    What about replacing the comma with double ampersand (&&)? 

     

     In a copy-pasteable format:

    rReturned in FY2024 =
    CALCULATE (
        DISTINCTCOUNT ( 'Opportunity Contact Role'[ContactId] ),
        'Opportunity Contact Role'[FY23 Donations] <> 0
            && 'Opportunity Contact Role'[FY24 Donations] <> 0
    )

    Best regards,