Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Dear community,
Main issue; finding the most compute effective approach.
Current Datamodel;
Background info;
Task;
My first approach;
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Table.Max(Table.SelectRows(Rates, (Rate) => Rate[Date]<=[Date] and Rate[Currency]=[Currency]),"Date")
),
#"Expanded Custom" = Table.ExpandRecordColumn(#"Added Custom", "Custom", {"Rate"}, {"Rate"})
Second approach;
Sales Revenue =
SUMX(
'Sales Revenue and Cost',
'Sales Revenue and Cost'[Line Amount] *
Calculate(
min('Exchange Rates'[Rate]),
filter('Exchange Rates',
'Exchange Rates'[From Currency]='Sales Revenue and Cost'[Company Currency] &&
'Exchange Rates'[Date]<='Sales Revenue and Cost'[Date] &&
'Exchange Rates'[To Currency]=SELECTEDVALUE('Reporting Currency'[Currency])
)
)
)
Third approach, and where I am stuck:
Sales Revenue = SUMX( VALUES('Sales Revenue and Cost'[Currency]), [Sales Revenue LCY] * [Sales Revenue Reporting Currency Rate] ) Sales Revenue LCY = SUM('Sales Revenue and Cost'[Line Amount]) Sales Revenue Reporting Currency Rate = Calculate( min('Exchange Rates'[Rate]), filter('Exchange Rates', 'Exchange Rates'[From Currency]=MAX('Sales Revenue and Cost'[Currency]) && 'Exchange Rates'[Date]<=MAX('Sales Revenue and Cost'[Date]) && 'Exchange Rates'[To Currency]=SELECTEDVALUE('Reporting Currency'[Currency]) ) )
I am stuck, quite beginners level and have spent so many hours to the point of much frustration - any hint of the right direction would be greatly appreciated!
Best regards,
Lasse
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
100 | |
88 | |
68 | |
61 |
User | Count |
---|---|
150 | |
120 | |
100 | |
87 | |
68 |