Forum Discussion

Seth4040's avatar
Seth4040
Regular Visitor
1 year ago
Solved

AP Data SUM based on multiple variables

I need some help being able to SUM this data Account Payable raw data in which has Invoice #, Inv Amount, GL Acct, Line Amount, Reviewer Group and OPS Center.  I always want to see how much in being invoiced per each OPS Center.  I have attached some documents to take a look at. I see because Different reviewer group that it is doubling the line amount when it should only be 86.72 of the 4896.31 invoice amount. 

 

Inv #Inv AmountGL AcctLine AmountReviewer GroupOPS Center
25022096760000024622.2351810.43.1204533.171218-INVCary/Raleigh
2502209676000004896.3151810.43.121886.721218-INVTriad
2502209676000004896.3151810.43.121886.721205-INVTriad

 

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Seth4040 

     

    Thanks for the reply from samratpbi .

     

    Seth4040, not quite sure what your desired result is, I used the following measure to calculate the sum of the Line Amount of the two OPS Centers in the sample data.

     

     

    Total Inv Amount = 
    SUMX(
        SUMMARIZE(
            'Table',
            'Table'[OPS Center],
            "LineAmount", MAX('Table'[Line Amount])
        ),
        [LineAmount]
    )

     

     

    Output:

     

    If you need further help, please feel free to let me know. It would be even better if you could give expected results based on example data. Please remove any sensitive data in advance.

     

    Best Regards,
    Yulia Xu

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • Hi, I can see your last 2 rows are same. Hence it is doubled. If duplicate rows are expected then you can take average instead of sum. 

    If this helps to resolve your issue then please mark it as solution, thanks!

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Seth4040 

     

    Thanks for the reply from samratpbi .

     

    Seth4040, not quite sure what your desired result is, I used the following measure to calculate the sum of the Line Amount of the two OPS Centers in the sample data.

     

     

    Total Inv Amount = 
    SUMX(
        SUMMARIZE(
            'Table',
            'Table'[OPS Center],
            "LineAmount", MAX('Table'[Line Amount])
        ),
        [LineAmount]
    )

     

     

    Output:

     

    If you need further help, please feel free to let me know. It would be even better if you could give expected results based on example data. Please remove any sensitive data in advance.

     

    Best Regards,
    Yulia Xu

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.