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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
SNik
Helper I
Helper I

How to add objects like Measures, DAX, ..... in a Power BI desktop file using PowerShell ?

Hi

Assuming i have Power BI desktop file (*.pbix) and lest assume i have the DimDate in it with data range of (From: 2000-01-01 ....To: 2050-01-01), i have the columns Year-Quarter-Month and many more..

 

I'd like to add a Hierarchy in the DimDate in PowerBI using Powershell or .NET code

 

something like

 

      H-Year                            <<--- this is the hierarchy name in Power BI

          Year                            <<--- This is the first level of the hierarchy

          Quarter                       <<--- This is the second level of the hierarchy

          Month                         <<--- This is the third level of the hierarchy

 

i don not want to do this manually , i need to automate this process, the reason is i have 100 measer and Hierarchy , columns that i need to create, so i prefer to do it dynamically using .NET or PowerShell

 

thanks

Nik

Sincerely
Nik- Shahriar Nikkhah
1 REPLY 1
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @SNik,

 

I'm afraid this is not achievable to create columns or measures via running PowerShell .NET code. Please submit this idea at this page, if this feature is mentioned by many users, PG will consider adding it to later release.

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.