Forum Discussion
Agg-tables - What is the difference between Count and Count Rows, and can you use distinctcount?
- 6 years ago
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
MaggieCommunity 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
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.