Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
How to merge such two tables:
to get such a result (value is divided by shares and bonds percentage)?
pbix is here if needed.
Solved! Go to Solution.
Hi pls try this code
let
Source = #"funds structure",
#"Replaced Value" = Table.ReplaceValue(Source,null,0,Replacer.ReplaceValue,{"shares", "bonds"}),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Replaced Value", {"funds"}, "Attribute", "Value"),
#"Merged Queries" = Table.NestedJoin(#"Unpivoted Other Columns", {"funds"}, #"funds value", {"funds"}, "funds value", JoinKind.LeftOuter),
#"Expanded funds value" = Table.ExpandTableColumn(#"Merged Queries", "funds value", {"value"}, {"value.1"}),
#"Changed Type1" = Table.TransformColumnTypes(#"Expanded funds value",{{"value.1", type number}}),
#"Added Custom" = Table.AddColumn(#"Changed Type1", "NewValue", each [Value]*[value.1]),
#"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"Value", "value.1"})
in
#"Removed Columns"
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 33 | |
| 29 |
| User | Count |
|---|---|
| 134 | |
| 96 | |
| 78 | |
| 67 | |
| 65 |