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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
Toerstad
Advocate I
Advocate I

Agg-tables - What is the difference between Count and Count Rows, and can you use distinctcount?

When you mark a table as an aggregate table in Power BI, you can map columns in the aggregate table to the details-table using summary functions like: Count, GroupBy, Max, Min, Sum and Count Rows.

I do understand that Count Rows is a count of all the rows making up the summary row in the aggregate table.

But, what is Count? A DAX COUNT of all the rows containing values? How does this work with blank or empty strings? As per usual DAX?

Something that would be very usefull is a summary function like DISTINCTCOUNT. Is this possible to achieve with PowerBI as-is, or is it a missing feature? Other summarization fuctions like COUNTX, AVG, ... would be great to see as well.

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @Toerstad 

CountRows->calculate the rows of a table

Count->calculate the rows of a column

DISTINCTCOUNT->calculate the distinct rows of a column

 

They all ignore the blank or empty strings.

COUNTA would consider blank or empty strings.

 

COUNTX, COUNTAX can calculate for measures.

 

You could learn more here:

A video: https://www.youtube.com/watch?v=V8wYTjKyvgk

DAX Reference:

https://docs.microsoft.com/en-us/dax/count-function-dax

 

Best Regards
Maggie

 

Community Support Team _ Maggie Li
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

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi @Toerstad 

CountRows->calculate the rows of a table

Count->calculate the rows of a column

DISTINCTCOUNT->calculate the distinct rows of a column

 

They all ignore the blank or empty strings.

COUNTA would consider blank or empty strings.

 

COUNTX, COUNTAX can calculate for measures.

 

You could learn more here:

A video: https://www.youtube.com/watch?v=V8wYTjKyvgk

DAX Reference:

https://docs.microsoft.com/en-us/dax/count-function-dax

 

Best Regards
Maggie

 

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

Hi.

Thank you for your reply. 

I have a fairly decent grip on how the regular DAX expressions work, but I feel how this is implemented in PowerBI aggregation tables are poorly documented on docs.

I assume they work the same way as per usual DAX, but this is an assumption.

As I mentioned, I would also like to see other summarization functions like DISTINCTCOUNT, is there any support for this? Will there be?

As i write this I realize that a COUNTROWS on an aggreagate table GroupedBy by the column i want to DISTINCTCOUNT might be an option. But – then this would bloat my PBIX due to the high cardinality of my column.

Hi @Toerstad 

Could you show an detailed example?

There are some references:

https://docs.microsoft.com/en-us/dax/distinctcount-function-dax

https://stackoverflow.com/questions/50414271/creating-a-measure-that-returns-distinct-count-by-count...

 

Best Regards
Maggie

 

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

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 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.

Top Solution Authors