Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
mm456
Frequent Visitor

Automate a calculated column with PowerShell

Hi all,

 

I'm trying to automate a PowerBi report that I have published that uses parameters to change the values for data coming from AzureBlobs.  I have one report and I'm using powershell to deploy changes to various workspaces such as changing the title of the report. However, I have a calculated called Area (below) that checks for specific strings in another column and renames them.

 

Area = SWITCH (

    TRUE(),
    CONTAINSSTRING(Data[Service],"Dev"),"Test",
    CONTAINSSTRING(Data[Service],"demo"),"Demo",
     "Other"
    )

Since, I'm using multiple datasources and expect this column to change from time to time with different values thus the calculation must be done on the fly. How can I calcucate this field either using PowerShell or within PowerBI or any other suggestions?
 


Thanks,

Marl

1 REPLY 1
lbendlin
Super User
Super User

That's more something you would do with ALM Toolkit or Tabular Editor. You can ask them to script the action and then "borrow"  the XMLA and reuse it in your Powershell scripts.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.