Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

comparing 2 total

i got a table look as in attached file

 for the same "ExpenseInvoiceID" i need the compare the Sum of "Linesum" with one of the line from"money from recon test"

 

in this case

125.76+150= 275.76

 

problem is that everytime money from recon sum are taken as double since 2 lines

 

 

this is just an example sometime the lines are 3

4 Replies

  • Hi Anonymous,

     

    Don't know if you want one formula with the comparision or not but try something like this:

     

    Valid = SUM(Table[LineSum]) - MAX([money from recon test])

    Then just add this with the  Expense ID to a table visual and you should get 0 if it equal.

     

    Regards,

    MFelix

  • v-danhe-msft's avatar
    v-danhe-msft
    Microsoft Employee

    Hi Anonymous,

    Based on my test, you could refer to below steps:

    Sample data:

    Create a measure:

    Measure = CALCULATE(SUM(Table1[LineSum]),FILTER('Table1','Table1'[SubID]=MAX('Table1'[SubID])))-CALCULATE(MAX('Table1'[money]),FILTER('Table1','Table1'[money]=MAX('Table1'[money])))

    Result:

    You could also download the pbix file to have a view.

     

    Regards,

    Daniel He

    • Anonymous's avatar
      Anonymous
      Not applicable

      it looks like to be working

      I got the same issue the sum if line sum 15049.79 - sum amount 172472.82 should be equal to diffe nav-xsp calculated with the formula u posted above,

      strange things that between the line I can see just few cents different where result sho as 2280.18

       

       

      i filter out the diffe that is not 0 put some of them still showing...

       

       

       

      • v-danhe-msft's avatar
        v-danhe-msft
        Microsoft Employee

        Hi Anonymous,

        Could you please share a sample file and post your desired result to help me test your problem?

         

        Regards,
        Daniel He