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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
mallap849
Helper I
Helper I

DAX calculation from two "sub" - tables

"C:\Users\priya\OneDrive\Sample File.pbix" 

 

Hello,

 

I am trying to create a variable - 2600PPM which is a basically a division from two sub tables i created. I used the following DAX command - 

2600 PPM = SUM('VP-Warehouse Exp'[2600CC Exp])/SUM(Mileage[2600 Series])
 
But it is not giving me a correct answer.
Please advice.
Thank you!
1 ACCEPTED SOLUTION
TheoC
Super User
Super User

Hi @mallap849 

 

If you cannot get @amitchandak's to work, try to break it down one step further by creating two independent sum measures, followed by the divide.  For example:

 

1. Sum 1 = SUM ( Table1[Column] ) 

2. Sum 2 = SUM ( Table2[Column] )

3. Divide = DIVIDE ( [Measure 1] , [Measure 2] , 0 ) 

 

Your output should be like below:

 

TheoC_0-1683585104641.png

 

Importantly, ensure your column format is value (i.e. Whole Number / Decimal).

 

Hope this helps.

 

Theo

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

View solution in original post

5 REPLIES 5
TheoC
Super User
Super User

Hi @mallap849 

 

If you cannot get @amitchandak's to work, try to break it down one step further by creating two independent sum measures, followed by the divide.  For example:

 

1. Sum 1 = SUM ( Table1[Column] ) 

2. Sum 2 = SUM ( Table2[Column] )

3. Divide = DIVIDE ( [Measure 1] , [Measure 2] , 0 ) 

 

Your output should be like below:

 

TheoC_0-1683585104641.png

 

Importantly, ensure your column format is value (i.e. Whole Number / Decimal).

 

Hope this helps.

 

Theo

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Thank you @TheoC it worked.

 

Regards,

Priyanka 

 

Really glad it worked for you, @mallap849!

If at all you get stuck in the future, do not hesitate to reach out. 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

amitchandak
Super User
Super User

@mallap849 , The link you posted above will not work.

 

Yoir calculation should work across common dimesion

2600 PPM = Divide(SUM('VP-Warehouse Exp'[2600CC Exp]),SUM(Mileage[2600 Series]) )

 

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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

"C:\Users\priya\OneDrive\Sample File.pbix" 

 

Hi @amitchandak ,

I have tried to reattach the file and I used the formula - 

PPM 2600 = DIVIDE(SUM('Expense'[2600cc Exp]),SUM('Car Mileage Data'[2600 Series]))
The syntax does not give an error but you can see that the value is not correct.
 
Please let me know.
 
Regards,
Priyanka 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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