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
Solved! Go to Solution.
Hi @t4r05,
You just need to remove the second "let".
let
Map = (val as number) => if val >= 10 then "a" else "b", // -- some functino defined before rest of query
let Source = OData.Feed("https://endpoint/odata"),
Bills_table = Source{[Name="Bills",Signature="table"]}[Data],
Result = Table.AddColumn(Bills_table, "MapValue", each Map(_[AmountBilled]))
in
Result
Best Regards,
Dale
Hi @t4r05,
Could you please mark the proper answer as a solution?
Best Regards,
Dale
Hi @t4r05,
You just need to remove the second "let".
let
Map = (val as number) => if val >= 10 then "a" else "b", // -- some functino defined before rest of query
let Source = OData.Feed("https://endpoint/odata"),
Bills_table = Source{[Name="Bills",Signature="table"]}[Data],
Result = Table.AddColumn(Bills_table, "MapValue", each Map(_[AmountBilled]))
in
Result
Best Regards,
Dale
Hi @t4r05,
Modify the name of the function and code as below on the screenshot and try again:
map
let
Source = (val as number) => if val > 10 then "a" else "b"
in
SourceRegards,
Ruslan
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 66 | |
| 44 | |
| 43 | |
| 36 | |
| 23 |
| User | Count |
|---|---|
| 196 | |
| 125 | |
| 105 | |
| 77 | |
| 56 |