Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi All,
I'm stuck trying to figure out a way to apply a currency conversion within the confines of PowerQuery.
I have two tables, one containing transactions (ie: a date and a value), and one containing currency conversions in the following format:
For the life of me, I cannot come up with any way to apply these conversions to my transaction table.
To make matters worse, I ideally need to do this entirely within PowerQuery, as this step will take place before some other merges, so my previous DAX solutions are out.
Anyone know a possible way to achieve this?
In Power Query, you can merge the tables and create a custom column.
M code:
let
Source = Table.NestedJoin(Transactions, {"Date"}, Rates, {"Start Date"}, "Rates", JoinKind.LeftOuter),
ExpandRates = Table.ExpandTableColumn(Source, "Rates", {"Rate"}, {"Rate"}),
AddColumn = Table.AddColumn(ExpandRates, "Converted Amount", each [Amount] * [Rate]),
ChangeType = Table.TransformColumnTypes(AddColumn,{{"Converted Amount", type number}})
in
ChangeType
Proud to be a Super User!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 46 | |
| 43 | |
| 39 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 68 | |
| 67 | |
| 31 | |
| 27 | |
| 24 |