Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Group by Customer - DAX Measure

Hi guys,   as I already got great help, I hope that you can quickly help me out regarding following issue.   I have a table with 2 Customers and several purchasements. We have the customerID, the...
  • AlB's avatar
    7 years ago

    Hi Anonymous

     

    Try this for your measure. You can set it in a Card visual, for instance.

     

    TotalAverage =
    AVERAGEX (
        ADDCOLUMNS (
            VALUES ( Table1[Customer] );
            "AvgPerCustomer"; DIVIDE (
                CALCULATE ( SUM ( Table1[Amount] ) );
                CALCULATE ( COUNT ( Table1[Amount] ) )
            )
        );
        [AvgPerCustomer]
    )

     

    Code formatted with