Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
bundipapa
Frequent Visitor

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).

bundipapa_0-1684231137096.png


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

bundipapa_1-1684231239425.png

 

 

Any help is appreciated.

1 ACCEPTED SOLUTION
Dhairya
Solution Supplier
Solution 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:

Dhairya_0-1684232160651.png

Measure will give following output:

Dhairya_1-1684232288608.png


Please mark my solution as Accepted if it helped you.

 

 

View solution in original post

3 REPLIES 3
Dhairya
Solution Supplier
Solution 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:

Dhairya_0-1684232160651.png

Measure will give following output:

Dhairya_1-1684232288608.png


Please mark my solution as Accepted if it helped you.

 

 

Thank you

You're welcome

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.