Forum Discussion

mcornfield's avatar
mcornfield
Icon for Helper III rankHelper III
4 years ago
Solved

DAX Calculate SUM Help

I am Trying to Get a SUM of a COunt of Customer Names. They are not summing.

 

 

  • Hi mcornfield ,

     

    Try the following code:

     

    Count = COUNTROWS ( FILTER(SUMMARIZE(Table,Table[CustomerName], "Customer Total", [Customer Tolal]),[Customer Total] > 0 ))

     

     

2 Replies

  • Hi mcornfield ,

     

    Try the following code:

     

    Count = COUNTROWS ( FILTER(SUMMARIZE(Table,Table[CustomerName], "Customer Total", [Customer Tolal]),[Customer Total] > 0 ))

     

     

  • You can iterate over each of the customers like this:

     

    SUMX (
        VALUES ( Table[CustomerName] ),
        IF ( [Customer Total] > 0, 1, 0 )
    )