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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
POWER_TESTING
Helper I
Helper I

COUNT , COUNTA DAX Function

Hi Experts,

 

Please can anyone give example for COUNT VS COUNTA

Table:

DATA

1

5

9

 

TRUE

FALSE

7

COUNT (i have read in blog only numbers but giving 6 count) and COUNTA also giving same result..

Please what is the different.

 

Thanks in Advance..!!!

1 ACCEPTED SOLUTION

@POWER_TESTING,

 

Despite the same name of statistical functions, the difference in the way they are used in DAX and Excel exists because in DAX a column has a type, and its type determines the behavior of aggregation functions. Excel handles a different data type for each cell, whereas DAX handles a single data type for each column. DAX deals with data in tabular form with well-defined types for each column, whereas Excel formulas work on heterogeneous cell values, without well-defined types.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Greg_Deckler
Community Champion
Community Champion

Hmm, did some testing with this, even on columns that only contained dates and both returned the same count. So, the documentation doesn't seem to mesh up with reality...



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
POWER_TESTING
Helper I
Helper I

Experts, please can you give small variance example.

Thanks for reply,

 

Which you had shared that link having one statement...

The difference between those two functions are, COUNTA can count TRUE/FALSE column but COUNT still raises an error.

 

in my data also have TRUE/FALSE and null data aswell.... 

COUNT taking everything, it's not throwing any error.

 

My question....

COUNT, COUNTA, COUNTX, COUNTAX these all functions showing same result... 

 

Note:  that link perfectly working in Excel speread sheet, but not in POWER BI. i'm really confusing. 

 

 

 

 

@POWER_TESTING,

 

Despite the same name of statistical functions, the difference in the way they are used in DAX and Excel exists because in DAX a column has a type, and its type determines the behavior of aggregation functions. Excel handles a different data type for each cell, whereas DAX handles a single data type for each column. DAX deals with data in tabular form with well-defined types for each column, whereas Excel formulas work on heterogeneous cell values, without well-defined types.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors