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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Automatically updating table references on measured fields

Let's say I create variable which is  sum(field)

 

Powerbi forces me to select the tableA.[columnname] syntax

 

sum(tableA.[columnname])

 

If i upload tableB, I want to be able to rename all tableA references without changing them each manually. 

I want to be able to upload a new csv file for example, and with the new csv file, I dont want to have rename the table reference to the new table.

 

Is there a way to do this?

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @bball3213,

You cannot dinamically change the calculation of a measure only based on the upload of a file, at most you can use a SWITCH measure however the 2 tables would have to exist in your model.

If your csv files are the same format you should append them in the same table and use a column to identify the file so then you can filter on it.

Check out the documentation on creating data from a folder that creates a function that appends files together so any measures will be made on the same table.

https://docs.microsoft.com/en-us/power-bi/desktop-combine-binaries

Regards
MFelix

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

1 REPLY 1
MFelix
Super User
Super User

Hi @bball3213,

You cannot dinamically change the calculation of a measure only based on the upload of a file, at most you can use a SWITCH measure however the 2 tables would have to exist in your model.

If your csv files are the same format you should append them in the same table and use a column to identify the file so then you can filter on it.

Check out the documentation on creating data from a folder that creates a function that appends files together so any measures will be made on the same table.

https://docs.microsoft.com/en-us/power-bi/desktop-combine-binaries

Regards
MFelix

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.