0
$\begingroup$

My total is set as Count (distinct). However, the total itself doesn't make any sense, as you can see in my attachment. Any ideas what I'm doing wrong? By not making any sense, I mean that the numbers above are not being added.

Any suggestions would be greatly appreciated.

enter image description here

$\endgroup$
1
  • $\begingroup$ If I am following correctly, the table is telling you that you have 79, 78, 80, and 83 distinct values in each of those respective months. The Total number of distinct values in the data is 85. Could you confirm this, please? $\endgroup$ Jan 7, 2020 at 18:02

1 Answer 1

1
$\begingroup$

Count distinct is a measure (aggregate function). When the measure is used in the total row, it is not summing the distinct count values about but is calculating the function in the context of all the table data. Without seeing the data I would make the assumption that there are 85 distinct values between those 4 months. March, for example, happens to contain 83 of 85 of those values.

If you want a sum of the values above, you can use SUMX.

Example:

Count of ProjectName = 
SUMX (
    VALUES ( 'put table name here'[MonthNameShort] ),
    CALCULATE ( DISTINCTCOUNT ( 'put table name here'[ProjectName] ) )
)

Comparison in Power BI: distinct count versus sumx with distinct count

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.