Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
10 years ago
Solved

how to count distinct values in a column

Hello all!   I'm trying to create a column that shows the total balance of each account. For example, I want the total balance of account 7055 and 8012. How do I go about doing that when I have mul...
  • Nhallquist's avatar
    Nhallquist
    10 years ago

    Here is my solution.  Not sure it meets your needs exactly, so let me know if you need more help.  

     

    Key formula for % of total:  Percent of Total Balance = Sum(Sheet1[Balance])/Calculate(Sum(Sheet1[Balance]),All(Sheet1))

     

    You can use the Acct. dimension i  Pie Chart.  Then, create a new Measure, and use the formula above to create % of Total.  This works because your individual Balance entries sum to the Total Balance.  You don't actually need the Total Balance column, or the Count of Rows for this.

     

    If you want the PBIX file and my data source, let me know and I can email it to you, or something.

     

    Nate