cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tomislav1975 Resolver II
Resolver II

Measure showing wrong subtotal

HI, 

I have measure that shows wrong subtotal when placed in matrix visual. I have one Payment table with CaseID (not unique), Value, InvoiceDate. Other Invoice table has CaseID (not unique), Value, PaymentReceivedDate.

When I place measure in matrix with CaseID rows show correct measure results, but subtotals do not. 

 

PBI file with sample

So 

UpsaleAmount:=

VAR InvoiceAmount=
CALCULATE(
SUM(InvoiceTable[InvoiceAmount],
USERELATIONSHIP(InvoiceTable[InvoiceDate], Calendar[Date])
)

VAR PaymentReceivedAmount=
CALCULATE(
SUM(PaymentTable[PaymentReceivedAmount]),
USERELATIONHIP(PaymentTable[PaymentReceivedDate], Calendar[Date])
)

RETURN

IF(InvoiceAmount<PaymentReceivedAmount, 
PaymentReceivedAmount - InvoiceAmount, 
BLANK())

 

1 ACCEPTED SOLUTION

Accepted Solutions
tomislav1975 Resolver II
Resolver II

Re: Measure showing wrong subtotal

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

View solution in original post

4 REPLIES 4
Brysonds Helper III
Helper III

Re: Measure showing wrong subtotal

When I exported the matrix to .csv from your Power BI app, the column totals matched what you are showing in Power BI. 

Is there any chance some of the cells in excel weren't being picked up?


Capture.JPG

 

tomislav1975 Resolver II
Resolver II

Re: Measure showing wrong subtotal

Check columns named 13_TI_Total Payments Received and 12_Upsale_Total Payments Received. This is where error shows.

tomislav1975 Resolver II
Resolver II

Re: Measure showing wrong subtotal

I have tried placing all transactions into one table and doing calculations over them, but I just do not have idea how to solve this.

tomislav1975 Resolver II
Resolver II

Re: Measure showing wrong subtotal

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

View solution in original post

Helpful resources

Announcements
‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

April 2020 Community Highlights

April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Top Solution Authors
Top Kudoed Authors