From 22aadda15d93b10c84acd1c5fc1eca5d2efafecd Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 20 Feb 2025 20:00:53 +0100 Subject: [PATCH] Another fix in the calculation --- libs/ui/src/lib/holdings-table/holdings-table.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/ui/src/lib/holdings-table/holdings-table.component.ts b/libs/ui/src/lib/holdings-table/holdings-table.component.ts index 57040a96b..b02261377 100644 --- a/libs/ui/src/lib/holdings-table/holdings-table.component.ts +++ b/libs/ui/src/lib/holdings-table/holdings-table.component.ts @@ -104,7 +104,8 @@ export class GfHoldingsTableComponent implements OnChanges, OnDestroy { (sum, current) => (sum += current.netPerformanceWithCurrencyEffect), 0 ); - this.totalChangePercentage = (this.totalChange / this.totalValue) * 100; + this.totalChangePercentage = + this.totalChange / (this.totalValue - this.totalChange); if (this.holdings) { this.isLoading = false;