Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Crazypad
Regular Visitor

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 

1 ACCEPTED SOLUTION

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

 

 

View solution in original post

7 REPLIES 7
DataNinja777
Super User
Super User

Hi @Crazypad 

Your dax code produces intersecting part like below:

Sakiko_2-1694035298758.png

 

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

Sakiko_3-1694035420110.png

 

 

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

Hi @Crazypad ,

 

As an illustration where "Attended" has 5 people and "Complete" has 5 people, of which 2 are overlapping with each other, your initial formula with double ampersand will calculate, 2 (only the intersecting part), while my formula with double pipe will calculate 8 (5 + 5 - 2), where 2 is subtracted in order to avoid double counting of the overlapping part.  In this illustration, what is your expected outcome?  Is it 10 where each "Attended" and "Complete" is counted independently of each other like they are mutually exclusive?  

 

Sakiko_0-1694213107379.png

 

Hi @Crazypad 

 

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

Sakiko_0-1694120304159.png

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

 

 

Hi @DataNinja777

No, not always does a member attend and complete. So I want it to count Attended(which is a column that populates if a member attended a meeting) and Compete(which is a column that populates if a member completed an interview. 

 

Hope that makes sense and thanks for your help!

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

 

 

That worked perfectly. 

 

Thank you!!!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.