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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
sarav93
New Member

Calculated Column sum of values in excel and DAX

 In excel,sum(-18-17+0+0+397982-557220+0+0+0+0+0+0-2108965) = -2268238, i got the sum as -2268238 but in power bi the value is been changed. how to acheive the same as adding positive values and negative values to achieve the same sum using power bi

2 ACCEPTED SOLUTIONS
Kaviraj11
Solution Specialist
Solution Specialist

Create a Measure

 

Total= CALCULATE(SUM(ColumnName))

View solution in original post

v-kaiyue-msft
Community Support
Community Support

Hi @sarav93 ,

 

Your solution is great, @Kaviraj11 . Here I have another idea in mind, and I would like to share it for reference. 

 

Based on your description, I created these data.

vkaiyuemsft_0-1714981064217.png


1. if you put the data in a table visual object and set the aggregation of num to sum, then the total row will automatically display the sum.

vkaiyuemsft_1-1714981077101.png

 

2. you can also create measure to display as @Kaviraj11  said.

Measure =
SUM('Table'[num])

vkaiyuemsft_2-1714981107258.png

By using measures, you can create some of the most powerful data analysis solutions in Power BI Desktop. measures help you by performing calculations on measures help you by performing calculations on your data as you interact with your reports.


More detailed information can be found at the link:
Tutorial: Create your own measures in Power BI Desktop - Power BI | Microsoft Learn
Context in DAX Formulas - Microsoft Support

 

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



View solution in original post

2 REPLIES 2
v-kaiyue-msft
Community Support
Community Support

Hi @sarav93 ,

 

Your solution is great, @Kaviraj11 . Here I have another idea in mind, and I would like to share it for reference. 

 

Based on your description, I created these data.

vkaiyuemsft_0-1714981064217.png


1. if you put the data in a table visual object and set the aggregation of num to sum, then the total row will automatically display the sum.

vkaiyuemsft_1-1714981077101.png

 

2. you can also create measure to display as @Kaviraj11  said.

Measure =
SUM('Table'[num])

vkaiyuemsft_2-1714981107258.png

By using measures, you can create some of the most powerful data analysis solutions in Power BI Desktop. measures help you by performing calculations on measures help you by performing calculations on your data as you interact with your reports.


More detailed information can be found at the link:
Tutorial: Create your own measures in Power BI Desktop - Power BI | Microsoft Learn
Context in DAX Formulas - Microsoft Support

 

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



Kaviraj11
Solution Specialist
Solution Specialist

Create a Measure

 

Total= CALCULATE(SUM(ColumnName))

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.