cancel
Showing results for
Did you mean:
Highlighted
Member

## Transaction log, totals by CaseID, calculate difference on CaseID level

Sample file

Hi, I have Trasaction log for invoices of different type and payments coming in. I need to see if payments per CaseID are bigger then Invoices for type 1, and for how much. And I'm stuck. Pls help. Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Member

## Re: Transaction log, totals by CaseID, calculate difference on CaseID level

Thanks for effort, solution to problem is at this link Final Word On Measure Totals.

4 REPLIES 4
Member

## Re: Transaction log, totals by CaseID, calculate difference on CaseID level

would you be able to share some sample data to work this out ?

Member

## Re: Transaction log, totals by CaseID, calculate difference on CaseID level

Super Contributor

## Re: Transaction log, totals by CaseID, calculate difference on CaseID level

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

`Payment = CALCULATE(AVERAGE(Table1[Amount]),FILTER('Table1','Table1'[CaseID]=MAX('Table1'[CaseID])&&'Table1'[TypeOfTransaction]="PAYMENT"))`
`Invoice = CALCULATE(AVERAGE(Table1[Amount]),FILTER('Table1','Table1'[InvoiceType]=1&&'Table1'[TypeOfTransaction]="INVOICE"))`
`Difference = [Payment]-[Invoice]`

Result:

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Member

## Re: Transaction log, totals by CaseID, calculate difference on CaseID level

Thanks for effort, solution to problem is at this link Final Word On Measure Totals.

Announcements

#### Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

#### Community News & Announcements

Get your latest community news and announcements.

#### Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

#### Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Top Kudoed Authors
Users Online
Currently online: 119 members 2,677 guests
Recent signins: