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
Shashi_Kant82
Helper I
Helper I

Getting Wrong in Total in Detail Table

Hi Community, I am encountering an unexpected outcome while utilizing a DAX query to perform calculations within a detail table. As illustrated in the attached image, the current DAX query is producing incorrect results. I kindly request assistance from the community in identifying and rectifying this issue.

PBI Query.png

1 ACCEPTED SOLUTION
grazitti_sapna
Super User
Super User

Hi @Shashi_Kant82 ,
Please Use the Dax Statement Below

SUM(Orders[Profit])/SUM(Orders[Sales])

I hope the provided solution works for you

If I have resolved your question, please consider marking my post as a solution. Thank you!
A kudos is always appreciated—it helps acknowledge the effort and keeps the community thriving.

View solution in original post

4 REPLIES 4
skparavind_1994
Frequent Visitor

Try this measure:

 

DIVIDE(SUM(Orders[Profit]),SUM(Orders[Sales]))
or
SUMX(Orders,SUM(Orders[Profit])/SUM(Orders[Sales]))

Arun_kumar
Frequent Visitor

Try this in measure :
SUMX(Orders,Orders[Profit]/SUM(Orders[Sales])

 

anmolmalviya05
Super User
Super User

Hi @Shashi_Kant82, Please try below measure

Profit Ratio =
DIVIDE(
SUM(Orders[Profit]),
SUM(Orders[Sales])
)

grazitti_sapna
Super User
Super User

Hi @Shashi_Kant82 ,
Please Use the Dax Statement Below

SUM(Orders[Profit])/SUM(Orders[Sales])

I hope the provided solution works for you

If I have resolved your question, please consider marking my post as a solution. Thank you!
A kudos is always appreciated—it helps acknowledge the effort and keeps the community thriving.

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! Prices go up Feb. 11th.

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.