Forum Discussion

vanessa's avatar
vanessa
Post Patron
9 years ago

Dynamically hide columns in a visual

Is there a way to dyncamically hide columns in a report?

 

Suppose i receive a file as a source which has 100 columns. The report (eg. table grid) with 100 columns will be created.

But tomorrow i receive the same file only with 40 columns, I want to use the same report but have the table grid with only 40 columns.

 

Is this possible?

1 Reply

  • v-caliao-msft's avatar
    v-caliao-msft
    Microsoft Employee

    Hi vanessa,

     

     Do you mean the table structure are different for different day? Based on my test, if you have 100 columns in your database on the first day, and then only have 40 colums on next day, then Power BI cannot refresh data with the error
    Expression.Error:The column "ColumnName" of the table wasn't found.

     

    In PBI desktop, you can first build all your visuals using required columns in your table. Then go to Data tab, select your table and column, right click & Hide in report view. This will make column disappear from the column list in report view, but all your visuals will stay as it is. When exporting to csv data will be there as well.

     

    Regards,

    Charlie Liao