Forum Discussion

jaryszek's avatar
jaryszek
Icon for Super User rankSuper User
1 year ago
Solved

Different sum calculated by dax and power query - why?

Hello, 

this is a result (true one!!) which power query calculated:


Now i created dax :

Total Amortized Cost = SUM('Fct_EA_AmortizedCosts'[CostInBillingCurrency])
and got:


Why? This is very important to have the results the same.

How to valid this sum?
Best,
Jacek

 

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi jaryszek,

     

    I hope the information provided has been useful. Please let me know if you need further clarification or would like to continue the discussion.

     

    If your question has been answered, please “Accept as Solution” and Give “Kudos” so others with similar issues can easily find the resolution.

     

    Thank you.

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi jaryszek ,

    Thanks for reaching out to the Microsoft fabric community forum.

     

    I have reproduced this scenario in Power BI (Fabric) to investigate why Power Query and DAX were showing different totals initially. I loaded the dataset containing the CostInBillingCurrency column into Power BI. In Power Query, I created a Blank Query, opened Advanced Editor, and used the formula:


    = List.Sum(Costs[CostInBillingCurrency])

     

    After applying the changes, I brought that result into the data model.

     

    I also created a DAX measure using:

    Total Amortized Cost = SUM(Costs[CostInBillingCurrency])

     

    Then, I added both values to a visual to compare them. The totals now match. This shows that when both queries and models reference the same clean data, Power Query’s List.Sum and DAX’s SUM() produce the same results.

    It’s likely that any earlier mismatch was caused by intermediate steps, filters, or transformations applied before running the List.Sum. After running this setup clearly, the results are consistent between Power Query and DAX.

    Posting this here to help anyone facing the same kind of confusion between Power Query and DAX totals in Power BI (Fabric).

     

    Please find the attached pbix file for your reference.

     

    If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.


    Best Regards,
    Tejaswi.
    Community Support

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi jaryszek,

       

      I wanted to follow up and see if you had a chance to review the information shared. If you have any further questions or need additional assistance, feel free to reach out.

       

      If the response answered your query, kindly “Accept as Solution” and Give “Kudos” to help others in the community benefit from it as well.

       

      Thank you.

      Tejaswi.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi jaryszek,

         

        I hope the information provided has been useful. Please let me know if you need further clarification or would like to continue the discussion.

         

        If your question has been answered, please “Accept as Solution” and Give “Kudos” so others with similar issues can easily find the resolution.

         

        Thank you.