Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I got a Document with 2 tables (Inventory, and Retail)
The inventory table is related to Retail via a column called RetailKey
What i want to calculate is the original retail which is to get the first unit retail of each item and multiply it by sum of quantities
Actually the user has to select an up to date for quantities calculation and another retail date
my expression is as follows:
sum(aggr(FirstSortedValue({<H_BPDate={"<=$(vRetailDate)"}>}[Unit Retail], -H_BPDate)
*
sum(Total <RetailKey>{<[Transaction Date]={"<=$(vUpToDate)"}>}Quantity)
,RetailKey))
this expression is put in a pivot table with the following dimensions (Country, Business Unit, Season)
the results are correct but the performance is extremely slow
how can I enhance the above expression
Please advise