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
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))
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 10 | |
| 9 | |
| 7 | |
| 6 |