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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
lee_a
Frequent Visitor

Cannot Delete Query/Parameter/Table

Hi, 

 

I have this query entry that I cannot delete. This query was originally belonged to a number of queries created when entering a local folder of files as a new source. The query was a parameter selecting which sample file to use for the sample transformations to apply to the rest of the files in the folder. After some changes to the model, the local folder of files is no longer where the data is and should be deleted however I cannot. It keeps saying it's being referenced by another query but I cannot figure out where this other query is. I've named the query in question as "DELETE ME". 

 

In the below image you can see the error message I get when trying to delete. I cannot find where this "Sample File Parameter2 (2)" is for the life of me. 

 

Delete Error MessageDelete Error Message

I've tried converting the query to a table or parameter. deleting all the M code etc. Nothing seems to work. 

 

Power Query CodingPower Query Coding

Per my query dependencies view, there's nothing this query is related to. 

 

No dependencies?No dependencies?

Please help. My sanity depends on it!!

 

21 REPLIES 21
StanleyBlack
Helper I
Helper I

Has anyone heard anything more on this?

 

I've renamed mine for the time being so it is out of the way but it's frustrating that it can't be deleted as I have number of queries already and it's just occupying space.

Hi @StanleyBlack ,

I have not heard anything on this issue.  Because I have another issue (a relationship that disappears

every time I refreshed the data), I rebuilt the entire report by copying everything from the old/broken

report into a new one.  With this method, I was able to get rid of the unused parameter, but Microsoft

has never offered a solution for simply deleting it.  Based on what I hear at PUG meetings and what I see

from my own bug reports, I doubt Microsoft can keep up with the bugs being submitted.

well found the issue but don't know how to fix it. 😞

 

Backup your pbix first (very important).

either rename the file from <name>.pbix -> <name>.zip  or use a 3rd party filemanager tha can open zip files by content.

contents of pbix file

 

The file you want is called datamashup

this seems to be a part binary/part xml file listing items in the data model.

I found all the incorrect references listed in here.  Although deleting them from the xml and importing the Datamashup back into the pbix file resulted in a corrupted file (as expected).  Hence the backup requirement at step 1 🙂

 

If anyone can work out how to edit the file cleanly.  We may have a solution to this....

 

 

Make sure that you have no Calculated columns or Measures that reference the Param, If you deleted all of these and the Params, it should work. 

I used Tabular editor from SQLBI, and saw I have 2 CC and 1 MX that referenced a para that had been deleted. 
Once i deleted all trace and reference to the params, it worked and no longer showe dup in my Code, 

PowerBi helper from RAd cad was also good to see the M code easily. 

gaccardo-slb
Advocate II
Advocate II

I have the problem also.  "Sample File Parameter2 (2)" is supposedly referencing a query that I didn't created, but there is no such parameter and not one single shred of Power Query code references the query or the parameter.

 

The problem is the result of using some of the transformations available on the toolbar to filter the data.  These transformations created multiple folders of queries, some of which could be deleted, and some of which can't.  It is absolutely a bug somewhere in Power BI.

Anonymous
Not applicable

Hi. 

 

I think i might have found the solution to this one. It's silly

Home -> Manage Parameters

 

See if you can find the sample beeing referenced there. Delete it. 

That worked for me atleast 🙂 

This really helped and worked for me. Thanks a lot! 

Anonymous
Not applicable

Thanks for sharing Christr, this did not fix the issue for me. I have no parameters, still have something being referenced.

Anonymous
Not applicable

Hi Christer, the problem we have is that the referenced paramater is not showing up on the "Manage Parameters" list:

 

Manage Parameters.jpgimage.png

@AnonymousI am having the same problem did you get lucky and find a solution?
Anonymous
Not applicable

Hi @Anonymous

 

Good that you have fixed this issue. If you can post the snapshot of that Manage parameters page here, that will help ofther people who are looking for solution for this issue.

 

Thanks

Raj

Anonymous
Not applicable

Have the same bug!!

 

Mine is called Sample File Parameter10 (2), and I can assure it is not visible ANYWHERE 

 

In my case, it started happening after I tried a CSV folder combination.

 

I'm still cheking if this affects the health of my dataset in any way.


pat_energetics
Advocate II
Advocate II

Hit this issue when trying to re-use a previous pbix file and rewrite the query over a new folder of CSV files.

 

Cannot delete - as the sample parameter 2(2) is referenced....., but this is not referenced anywhere that is visible.

 

@v-piga-msft is this a bug, or are there hidden queries that are genuinely referenced when running over a folder ?

 

Thanks

 

 

Anonymous
Not applicable

Has anyone found any solution to this yet? I am facing the same problem. There's this query that I want to delete but can't because it's not showing up in the Power Query pane but this table is showing up in my data model in Power Pivot. I can't delete it from Power Pivot because it re-directs me to delete it using Power Query since it's created from there. What is happening here??? Is this a Microsoft bug or am I not doing it right ? 

RahMan911
Frequent Visitor

There must be an error table referencing it. Delete the error table first

Hi Rahman

 

I don't have any error tables remaining in my data model. Even the Table/queries that were originally related to this item have all been deleted successfully. 

Hi @lee_a,

 

The query may also be referenced in methods in the Advanced Editor. You could try to look for the "Sample File Parameter2 (2)" in the advanced Editor. 

 

Best Regards,

Cherry

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

Hi Cherry, 

 

"Sample File Parameter2 (2)" refers to a query that has been deleted or at least renamed.

 

I've reviewed all my PowerQuery coding in advanced coding for every single one of my other queries and "Sample File Parameter2 (2)" does not exist. 

 

I've renamed the query to be deleted and changed the underlying PowerQuery coding in multiple different ways and none of my other queries have broken. 

 

Could you explain a little bit more about what you mean by "Methods"? 

 

I think this is a bug... I have a query which is apparenlty being referenced somewhere and the references view doesn't show this apparently relationship.

Anonymous
Not applicable

This is interesting, but without the table being referenced anywhere, this error wont occur .

It's possible that I've missed this "Sample File Parameter2 (2)" text in my advanced editor coding in my queries but I've double checked multiple times. Let's say I am in fact overlooking this or not looking in the right place, if the references editor was working properly, wouldn't I see where the query I'm trying to delete is being referenced? Further, if I changed this query from a table, to a parameter, to a function, added text, etc etc, wouldn't the supposed query/table that references it break and thus direct me to where this reference is so I can delete it?

 

Something's not working.

 

Maybe we can get better debug tools...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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