Forum Discussion

lee_a's avatar
lee_a
Frequent Visitor
8 years ago

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 Message

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

 

Power Query Coding

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

 

No dependencies?

Please help. My sanity depends on it!!

 

21 Replies

  • Anonymous's avatar
    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 :) 

    • Anonymous's avatar
      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's avatar
      Anonymous
      Not applicable

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

       

      • nmck86's avatar
        nmck86
        Post Patron
        AnonymousI am having the same problem did you get lucky and find a solution?
    • Anonymous's avatar
      Anonymous
      Not applicable

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

  • RahMan911's avatar
    RahMan911
    Frequent Visitor

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

    • lee_a's avatar
      lee_a
      Frequent Visitor

      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. 

      • v-piga-msft's avatar
        v-piga-msft
        Resident Rockstar

        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

  • Anonymous's avatar
    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 ? 

  • 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's avatar
    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.


  • Anonymous's avatar
    Anonymous
    Not applicable

    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.

  • 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.

    • Anonymous's avatar
      Anonymous
      Not applicable

      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.

      • K960154's avatar
        K960154
        New Member

        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....