Forum Discussion

SachinC's avatar
SachinC
Helper V
8 years ago
Solved

Count (Distinct) Totals not working

Hi there, I have a couple of Power BI reports where my Count Distinct Totals aren't working. See screenshots below.  If I don't apply Distinct, the totals are fine. Please help? Thank you.   ...
  • v-juanli-msft's avatar
    8 years ago

    Hi

    Look at my test

    This is my dataset

    Then add these columns to a table visual

    The second column is "count" of "refer", the third is "distinct count" of "refer", to get what you want:

    each line should be distinct count, but the total should be the total of count, just like the last column.

    it is a measure 

    distinctount = IF(HASONEVALUE(Sheet1[name]),DISTINCTCOUNT(Sheet1[refer]),COUNT(Sheet1[refer]))

     

    Best Regards

    Maggie