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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
KAchukatla
New Member

Divide sum of one column by sum of another column

Dear Team, 

 

I have  trying to divide 2 columns but it is not giving accurate number. For Eg. 

Project A 

CO2 Emitted in Tons, Jan=215, Feb=315,Mar=123 , TOTAL= 438

Area in m3,Jan=120,Feb=150.Mar=100 , TOTAL = 370

CO2 footprint tons /M2 YTD for projectA = 438/370 = 1.8  CORRECT, 

 

But system is calculating for eah month and adding up the values as shown below

CO2footprint/m2, Jan = 1.8, Feb=2.1 , Mar=1.23 , 

YTD = 5.13  WORNG . 

It is simple divid funtion to divide Total Sum Column A(CO2 emitted) by Total Sum of COlumn B(area).

 

Kindly let me know if you need more infomration 

 

 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

I'm not quite sure about your math here.

 

First, the CO2 emitted with your numbers adds up to 653, not 438.

The area number is correct.

 

Second, 438/370 does not equal 1.8, it equals 1.18

 

Now, 653/370 = 1.76

 

Now, if I create a measure like:

 

Measure = SUM([CO2]) / SUM([Area])

The total line comes out to 1.76, which is correct. This is in a table with Month, CO2 and Area columns.

 

And people wonder why there are still global warming skeptics... 🙂

 

 

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Super User
Super User

I'm not quite sure about your math here.

 

First, the CO2 emitted with your numbers adds up to 653, not 438.

The area number is correct.

 

Second, 438/370 does not equal 1.8, it equals 1.18

 

Now, 653/370 = 1.76

 

Now, if I create a measure like:

 

Measure = SUM([CO2]) / SUM([Area])

The total line comes out to 1.76, which is correct. This is in a table with Month, CO2 and Area columns.

 

And people wonder why there are still global warming skeptics... 🙂

 

 

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hi Smoupre, 

 

I am new to the power BI and thank you for the providing assistance in fixing the issue.   

 

Really i do not why i did the worng calculation 🙂

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.