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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors