Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Seth4040
Regular Visitor

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

 

1 ACCEPTED SOLUTION
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:

vxuxinyimsft_0-1738223236016.png

 

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.

View solution in original post

2 REPLIES 2
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:

vxuxinyimsft_0-1738223236016.png

 

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.

samratpbi
Super User
Super User

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!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.