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
nikhil0511
Advocate I
Advocate I

Excel column values assigned manually changes upon refresh

My excel sheet contains two columns, first column loads via power query and second coulmn I will be assigning the values. But, the values I assign keeps changing upon refresh as new values are added to query loaded column. 

 

I need a solution for this as I'm having two excel sheets like this and they are keep messing around my results.

nikhil0511_0-1640597776383.png

Category values are loaded via power query and i will assign the factor values to them. 

 

Please note: this table values are again loaded to my data model.

1 ACCEPTED SOLUTION

Hi @nikhil0511 ,

 

On the query editor select the column of the factor and then make use of the replace values on the value to find write null and 1 on the Replace with:

 

MFelix_0-1640786312687.png

 

If you don't have null but have blank then don't write anything on the value to find

MFelix_1-1640786430450.png

 

 


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

3 REPLIES 3
nikhil0511
Advocate I
Advocate I

Hi @MFelix 

Thank you I have resolved this issue by the concept self-referencing query or table. 

 

but now I want to set the blank values to "1" when they refresh not messing around the other values.

 

for example say a new row of category as 'books" added after refresh, then the factor value is blank, instead it should have a default value of 1

 

can this be possible or do i need to manually assign the values to the new;y added rows?

 

Hi @nikhil0511 ,

 

On the query editor select the column of the factor and then make use of the replace values on the value to find write null and 1 on the Replace with:

 

MFelix_0-1640786312687.png

 

If you don't have null but have blank then don't write anything on the value to find

MFelix_1-1640786430450.png

 

 


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



MFelix
Super User
Super User

Hi @nikhil0511 ,

 

I assume you are placing the values in your table and they are getting in sorting A to Z in this case everytime you add new values the columns you add in excel are not bound to the query so it get's messed around.

 

This is because altough you have the value in the same table in excel when you do the refresh and add the new data the order of the columns are only for the values of the query there is no relation between the query data and the "new column" this new factor should be added in the query editor to avoid this missmatch.

 

One option is to after you have made the changes create a copy of the file but wiht values only and then make the merge of this file with the previous one in order to always pick up the factor that you added then the cells that are empty are the ones you need to fill, then saved the text only file with the new values.


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.