Forum Discussion

Shashi_Kant82's avatar
1 year ago
Solved

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.

  • 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.

4 Replies

  • 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.

  • Arun_kumar's avatar
    Arun_kumar
    Frequent Visitor

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

     

  • Try this measure:

     

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