Forum Discussion

jaswalsarthak's avatar
jaswalsarthak
Frequent Visitor
1 year ago
Solved

Row Total showing different value

Hi Experts, i have written the below dax that calcualtes the Retail Margin for each month. The below dax shows correct information at monthly level. however when i try to show the toal of the month the value is completely different.

 

"RM YTD = DIVIDE([Units In Price]*SUMX('RM Data','RM Data'[Value]),103)"

 

To solve the above issue i further wrote another Dax. still its not showing the correct Total.

"

RM YTD Number = SUMX('BI Sales','BI Sales'[RM YTD])"
 
Reques you all to suggest a solution 

 

  • Hi jaswalsarthak 

    Thanks for reaching out to the Microsoft Fabric Community Forum.

    Here i have repro your scenario with a sample data,please try the formula i hope it will work for you as well:

     

    RM_YTD = SUMX( 'Sales',DIVIDE('Sales'[Units In Price] * 'Sales'[Value], 103))

     

    By using SUMX in the RM YTD measure, the calculation iterates over each row to compute the retail margin and then sums up the results. This ensures that the total matches the sum of individual rows.

     

    If you’re still experiencing issues, feel free to reach out to us for further assistance!

     

    If you find this post helpful, please mark it as an "Accept as Solution" and give a KUDOS 😊.

     

6 Replies

  • jaswalsarthak ,

    Mutiplication need to done at row level , check if this possible

     

    RM YTD = DIVIDE(SUMX('RM Data','RM Data'[Value]*[Units In Price]),103)

     

    or

     

    Keep this same

    RM YTD = DIVIDE([Units In Price]*SUMX('RM Data','RM Data'[Value]),103)

     

    Change to consider Matrix column field

     

    RM YTD Number = SUMX(BValues('BI Sales'[Month Year]), [RM YTD])

  • v-karpurapud's avatar
    v-karpurapud
    Community Support

    Hi jaswalsarthak 

    Thanks for reaching out to the Microsoft Fabric Community Forum.

    Here i have repro your scenario with a sample data,please try the formula i hope it will work for you as well:

     

    RM_YTD = SUMX( 'Sales',DIVIDE('Sales'[Units In Price] * 'Sales'[Value], 103))

     

    By using SUMX in the RM YTD measure, the calculation iterates over each row to compute the retail margin and then sums up the results. This ensures that the total matches the sum of individual rows.

     

    If you’re still experiencing issues, feel free to reach out to us for further assistance!

     

    If you find this post helpful, please mark it as an "Accept as Solution" and give a KUDOS 😊.

     

    • v-karpurapud's avatar
      v-karpurapud
      Community Support

      Hi jaswalsarthak 
      I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
      Thank you.

  • v-karpurapud's avatar
    v-karpurapud
    Community Support

    Hi jaswalsarthak 
    Hope you are doing well!

     As we haven’t heard back from you, we wanted to kindly follow up to check if the solution we provided for your issue worked for you  or let us know if you need any further assistance?

     

    Your feedback is important to us, Looking forward to your response. 

  • v-karpurapud's avatar
    v-karpurapud
    Community Support


    Hi jaswalsarthak 
    Hope you are oing well!
    I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
    Thank you.