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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Is it posible to assign the Record Field name dynamically.
I am currently getting an error.
let
fieldName = {"a","b"},
src=[fieldName{0}=1,fieldName{1}=2]
in
src
Thank you in advance
Solved! Go to Solution.
How about this?
let
fieldNames = {"a","b"},
src=Record.FromList({1,2}, fieldNames)
in
src
Thanks @AlexisOlson
Here's another method that's more in the spirit of your attempt but not at nice:
let
fieldNames = {"a","b"},
src=Record.Combine(
{
Record.AddField([],fieldNames{0},1),
Record.AddField([],fieldNames{1},2)
}
)
in
src
How about this?
let
fieldNames = {"a","b"},
src=Record.FromList({1,2}, fieldNames)
in
src
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 10 | |
| 9 | |
| 6 | |
| 5 | |
| 3 |