Forum Discussion

Crazypad's avatar
Crazypad
Regular Visitor
3 years ago
Solved

Counting 2 columns from the same table

I am trying to create a measure that counts the  "Attended" from the Attendance column and the "Complete" from the Interview Status__C column. I have a formula that pulls in the "Attended" totals but it doesn't add "Complete" totals":

 

Count Attended plus Completed =
COUNTX(
    FILTER(
        'Campaign Member',
        'Campaign Member'[Attendance] = "Attended" && 'Campaign Member'[Interview_Status__c] = "Complete"
    ),
    1
)

 

 

This is new to me so any help would be much appreciated. 

TIA 

  • jfern78's avatar
    jfern78
    2 years ago

    maybe you can use something like this to count attended and complete

     

    Measure = var _attended = COUNTX(FILTER('Campaign Member',

            'Campaign Member'[Attendance] = "Attended"),
        1
    )
    var _complete = 
    COUNTX(
        FILTER(
            'Campaign Member', 'Campaign Member'[Interview_Status__c] = "Complete"
        ),
        1
    )
    return _attended + _complete

     

     

7 Replies

  • Hi Crazypad 

    Your dax code produces intersecting part like below:

     

    What about replacing double ampersand with or (||)?  

     

     

    • Crazypad's avatar
      Crazypad
      Regular Visitor

      Hi DataNinja777 - I want it to combine/add both "Attended" and "Complete" but with my original formula, it is only counting Attended. 

      • DataNinja777's avatar
        DataNinja777
        Super User

        Hi Crazypad 

         

        It sounds like your "Attended" field is a subset of "Complete" field, and everyone who "Attended" has "Completed" interview.  Is this correct?  

        Replacing double ampersand ("&&") with double pipe ("||") counts "Complete" without double counting "Attended".  Is this what you want?