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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Broeselchen
Helper III
Helper III

Calculated column with a sum

Hello, I need a calculated column with the total sales of each customer. I can't do it in a measure because I need it to eliminate the duplicates for the connection to an other table.

Example:

Broeselchen_0-1673279052929.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Broeselchen , A new column

 

Sumx(filter(Table, [Customer] = earlier([Customer]) ), [Sales])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

5 REPLIES 5
serpiva64
Solution Sage
Solution Sage

Hi, 

you can try this calculated column

Column = var currclient = 'Table'[Column1]
var result = CALCULATE(sumx('Table','Table'[Column2]), FILTER('Table', 'Table'[Column1]=currclient))
return
result
 
serpiva64_0-1673280941653.png

If this post isuseful to help you to solve your issue consider giving the post a thumbs up and accepting it as a solution !

 

Migasuke
Solution Sage
Solution Sage

Hi @Broeselchen ,
If I understand well - you want to have new column with Total Sales, correct?
If yes - please try following formula:

Migasuke_0-1673280293902.png

 



If my answer was helpful please give me a Kudos or even accept as a Solution.

Let's connect on LinkedIn!

Sorry, this didn't work.

Strange that it does not work for you, but I see that amitchandak has some alternative solution.
Good luck with your project!

 



If my answer was helpful please give me a Kudos or even accept as a Solution.

Let's connect on LinkedIn!

amitchandak
Super User
Super User

@Broeselchen , A new column

 

Sumx(filter(Table, [Customer] = earlier([Customer]) ), [Sales])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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