Sumx Performance Issue

AlwaysNeedExcelHelp

New Member
Joined
Sep 24, 2019
Messages
6
Hey all,

I'm having some performance issues with Sumx that are causing very slow measure performance as was wondering if you smart people would know of a better way to accomplish these



TestMeasure=

'Take the slicer selection date'
VAR CalculationDate= [SelectedDate]

'Calculate USD values, no need to lookup anything
VAR CalcResult=
CALCULATE (
SUM ( Data[Amount] ),
FILTER ( VALUES ( Data[Currency] ), [Currency] = "USD" ),
FILTER (
VALUES ( Date[Due] ),
&& [Due] <= CalculationDate
))

'Perform NonUSD
+ CALCULATE (
SUMX (
'Data',
(
Data[Amount]
*
'find numerator of exchange rate
LOOKUPVALUE (
FXMarketRates[Multiplier],
FXMarketRates[FromTo], Data[Currency],
FXMarketRates[Eff Date], CalculationDate,
FXMarketRates[Rate Type], "CRRNT"
)
)
/

'find denom of exchange rate
LOOKUPVALUE (
FXMarketRates[Divisor],
FXMarketRates[FromTo], Data[Currency],
FXMarketRates[Eff Date], CalculationDate,
FXMarketRates[Rate Type], "CRRNT"
)
),
FILTER ( VALUES ( Data[Currency] ), [Currency] <> "USD" ),
FILTER (

VALUES ( Data[Due] ), [Due] <= CalculationDate
))

RETURN
IF ( ROUND ( CalcResult, 2 ) <> 0, ROUND ( CalcResult, 2 ) ) + 0
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Forum statistics

Threads
1,223,952
Messages
6,175,596
Members
452,657
Latest member
giadungthienduyen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top