Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

New Columns added not showing up in Direct Query Connection

I've used a direct query connection to build some charts and I have unpivoted a few columns. However, after new columns were added to the database view, I can't see them. I am not sure what I'm missing here.

 

When I create a new direct query connection, I'm able see all the columns. 

 

Need help 😞

 

Thanks

saujanya

21 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    You can go into the query edit, refresh the preview and then sort one of the new columns not shown ascending or descending and finally save and apply. They should appear now... and you can go back in and delete the sorting step in the query editor... the columns remain visible...

  • Found a solution for this problem, for other reader clarification, this is related to connecting to a semantic model from another pbix with direct query. You will not see any queries under Edit Query or Advanced Editor as this is not direct query to a query only, the entire data model comes from semantic model. 

     

    What i did was open Data Source Setting under Transform Data, click "Change source", re-select the semantic model again (the similar one) then wait the pop up box to load (Do not re-select any tables here otherwise it will be duplicated) and just click submit. The newly added fields/column will appear.

  • Anonymous's avatar
    Anonymous
    Not applicable

    I have the same issue. Have you found a fix? 

     

    Basically, I can't see the column in the fields of the direct query tables. However, I can see the new columns when I press Edit Queries > and press the DQ table (preview). 

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    I don't work a ton with Direct Query, can you paste your M code from Advanced Editor?

  • v-kelly-msft's avatar
    v-kelly-msft
    Community Support

    Hi Anonymous ,

     

    Have you clicked on "refresh" in report view or in query editor after you updated your data?

     

     

    Based on my test,it works fine here,after I added new data to my database,then clicked "refresh",the data then was updated.

     

    Best Regards,
    Kelly
     
    Did I answer your question? Mark my post as a solution!
    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello v-kelly-msft 

       

      Yes, I hit refresh and still didn't work. Was your test successful after unpivoting selected columns. I am guessing the new columns don't show up after transformations have been made.

      • v-kelly-msft's avatar
        v-kelly-msft
        Community Support

        Hi Anonymous ,

         

        Yes,I followed your steps and unpivot some columns,then add new data in database, then refresh in desktop, after that,I create a table visual, and see the new data show up in the visual. But when I go to query editor,at the very start,I didnt  see the new data show up, so I refresh again ,and finally  it show up.

        I'm guessing whether there's an error in the connection with your data source,would you pls go to query editor>advanced editor to see whether there's an error?

         

        Best Regards,
        Kelly
         
        Did I answer your question? Mark my post as a solution!
  • Hi Anonymous 
    We had the same issue just now
    We were simply loading the DQ SQL table without any PQ-level alterations; new columns added in SSMS/SQL table would not appear.
    Fixed via forcing a table reload; added a sorting step in PQ -> table reloads in PBI -> Fields now appearing
    Hope this helps

  • Anonymous's avatar
    Anonymous
    Not applicable

    I am facing the same issue. I updated tablequery in database that returns one additional column but that column didn't appear in powerBI refresh. How can I resolve it?

    • Anonymous's avatar
      Anonymous
      Not applicable

      I came across this issue today and a search led me to this thread. I tried to delete my view and add it back. But frequent changes frustrated me leading again to do some trial and error. Here is what worked for me.

      1. Select the table/view from Fields Panel, Right click on it

      2. Select Edit Query which will take you to Power Query Editor 

      3. Select the Home->Manage Columns->Choose Columns drop down and select Choose Columns

      4. Just unselect any random column from the list and click Home->Apply & Close->Apply

      5. This will show the all the columns now excluding the one unselected in Step 4

      6. Repeat Step 3 and select all columns you need and repeat Step 4

       

      Hope it works for you, it did for me. This obviously a bug in Power BI.

       

      Thanks,

      Lachhaman