Forum Discussion

Toerstad's avatar
Toerstad
Advocate I
6 years ago
Solved

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.

  • 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.

3 Replies

  • v-juanli-msft's avatar
    v-juanli-msft
    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.