The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hey guys,
I would like to replace a static value (in that case a column reference) by an variable:
I tried it the following way which didn't work:
"RemovedColumns[#"""& HierachyAttribute &"""]"
Would appreciate any hints 🙂
Thanks Dan
Solved! Go to Solution.
You can try following (this will depend upon your context)
Table.Column(RemovedColumns,HierachyAttribute)
Example is below
RemovedColumns = Table.RemoveColumns(#"Changed Type",{"Country"}),
HierachyAttribute = "Sales Channel",
#"Added Custom" = Table.AddColumn(RemovedColumns, "Custom", each Table.Column(RemovedColumns,HierachyAttribute))
You can try following (this will depend upon your context)
Table.Column(RemovedColumns,HierachyAttribute)
Example is below
RemovedColumns = Table.RemoveColumns(#"Changed Type",{"Country"}),
HierachyAttribute = "Sales Channel",
#"Added Custom" = Table.AddColumn(RemovedColumns, "Custom", each Table.Column(RemovedColumns,HierachyAttribute))