Forum Discussion

bundipapa's avatar
bundipapa
Icon for Helper I rankHelper I
3 years ago
Solved

Get SUM per customer

Hello,

 

this is a massively beginner question bu I wasn't able to find a solution yet. I need to create a column, where I would have the total revenue for every customer. So it would repeat per customer. In excel it would be a simple SUMIF(Revenue, Customer=Customer in the given line).


However  as a total beginner, I'm unable to recreate this as a column in Power BI.

 

 

Any help is appreciated.

  • You can create Calculated column or measure using below DAX code:

    Category Revenue = CALCULATE(SUM(CustTable[Revenue]),ALLEXCEPT('CustTable','CustTable'[Customer]))

    Calculated Column will give following output:



    Measure will give following output:


    Please mark my solution as Accepted if it helped you.

     

     

3 Replies

  • Dhairya's avatar
    Dhairya
    Icon for Solution Supplier rankSolution Supplier

    You can create Calculated column or measure using below DAX code:

    Category Revenue = CALCULATE(SUM(CustTable[Revenue]),ALLEXCEPT('CustTable','CustTable'[Customer]))

    Calculated Column will give following output:



    Measure will give following output:


    Please mark my solution as Accepted if it helped you.