Forum Discussion

sudhav's avatar
sudhav
Icon for Helper V rankHelper V
4 years ago
Solved

power bi service

hai my dear professionals,

I have encountered one question in an interview, please help me to get an answer for it

"You created a file and copied that  report in a file. Your manager used to update file everyday and PBI will refresh the data automatically, this is the process. One day unfortunately your manager deleted the column names, then obviouslly the second row will become first row right?, now how does PBI will react it??"

Please give me answer for it

Thankyou in advance

 

  • Hi sudhav ,

     

    That is a pretty specific interview question.  It seems to me that this question would be a good question on an exam.

    That said, If somebody deletes a COLUMN that does not affect the rows.  And, what happens to the report depends on a lot of factors.  The first factor is the type of file that you are bringing in.  The next factor is whether you have any applied steps that are based on that column.  Another factor is what your M code looks like when the file comes in - if you are selecting fields specifically (like from SQL) then that will affect the connection.  And, if it is an Excel file, if you have the column count named in the M code, that will also affect the connection.

    All that said, the basic answer is that if you have a data source, and the data source changes, you will most likely get an error message on the refresh that you can then investigate to determine what happened to your source file and how to resolve it.

  • Hi, sudhav ;

    The analysis will be divided into the following cases:

    1.Import Mode

      a)when we connect the excel,and publish to service, if we delete the column in power bi desktop,then re-publish it. it ok ,you         could see there the second row will become first .

      b)if we delete first column in excel file,then we refresh it ,it will fail.and error is "Unable to connect to the data source undefined."

        so we must re-connect the excel fille in power bi desktop then re-publish it.

        

    2.Direct Query mode

     if we delete column in sql ,then refresh it , it will ok ,but the report not display,because the column is deleted.

     


    Best Regards,
    Community Support Team_ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies

  • Hi sudhav ,

     

    That is a pretty specific interview question.  It seems to me that this question would be a good question on an exam.

    That said, If somebody deletes a COLUMN that does not affect the rows.  And, what happens to the report depends on a lot of factors.  The first factor is the type of file that you are bringing in.  The next factor is whether you have any applied steps that are based on that column.  Another factor is what your M code looks like when the file comes in - if you are selecting fields specifically (like from SQL) then that will affect the connection.  And, if it is an Excel file, if you have the column count named in the M code, that will also affect the connection.

    All that said, the basic answer is that if you have a data source, and the data source changes, you will most likely get an error message on the refresh that you can then investigate to determine what happened to your source file and how to resolve it.

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Icon for Community Support rankCommunity Support

    Hi, sudhav ;

    The analysis will be divided into the following cases:

    1.Import Mode

      a)when we connect the excel,and publish to service, if we delete the column in power bi desktop,then re-publish it. it ok ,you         could see there the second row will become first .

      b)if we delete first column in excel file,then we refresh it ,it will fail.and error is "Unable to connect to the data source undefined."

        so we must re-connect the excel fille in power bi desktop then re-publish it.

        

    2.Direct Query mode

     if we delete column in sql ,then refresh it , it will ok ,but the report not display,because the column is deleted.

     


    Best Regards,
    Community Support Team_ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.