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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Clint
Helper V
Helper V

Understanding results returned by CountAX function

Hello,

 

I have a table that has records with various status values.  Ideally, I'd like to count all records except for those in certain statuses but I have not been able to figure out the dax to make that work.  As an alternative, I built a measure to count only those records in the statuses I want to remove from the total so I can subtract this value from the overall count.  
I am using the following to count the records w/the statuses I will later subtract:

M_Inactive Items = COUNTAX('Boydenhancements','Boydenhancements'[Status] iN {"Removed","N/A","Completed","Not Approved"}
)
The problem is, this measure should return a number of 48 but instead, it returns the total count of all records which is 232.  Not sure why it is ignoring the IN part of the expression but would appreciate some insight as to where I"m going wrong here...
1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Clint try the following measure,

COUNTAX (
FILTER (
'Boydenhancements',
'Boydenhancements'[Status] IN { "Removed", "N/A", "Completed", "Not Approved" }
),
'Boydenhancements'[Status]
)

Regards,
MFelix

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





View solution in original post

4 REPLIES 4
MFelix
Super User
Super User

Hi @Clint try the following measure,

COUNTAX (
FILTER (
'Boydenhancements',
'Boydenhancements'[Status] IN { "Removed", "N/A", "Completed", "Not Approved" }
),
'Boydenhancements'[Status]
)

Regards,
MFelix

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Thank you @MFelix , this worked perfectly.

vanessafvg
Community Champion
Community Champion

@Clint  are you able to share some of the data?

 

 




If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Hi Vanessa - MFelix was able to show me the correct syntax.  Thank you for the response.

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.