Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Dynamically/automatically add columns/fields to a table visual

Hi Guys,

 

I have a question that I wasn't able to find an answer to online, so was hoping for a little help.

 

I want to dynamically add columns/fields to a table visual over time.

 

I have a table that increases in width (columns/fields) over time. Here's what my data source looks like:

 

Tomorrow, that table could widen by 1 or more columns. Like this:

 

 

Ideally, I'd like the Power BI table visual to automatically pick up that change and display it in my report upon refresh. The query automatically picks up new columns/fields, but the final hurdle is automating the addition to the table visual.

 

Is there a way to do this? Or if you have any other suggestions in respect of refactoring/changing data structure to achieve a similar end goal, I'd be immensely grateful.

 

Thank you in advance for taking the time to look at this 🙂 !!

1 Reply

  • sturlaws's avatar
    sturlaws
    Resident Rockstar

    Hi Anonymous ,

     

    if you want your power bi report to respond to new fields automatically, I think you have to look into the 'Unpivot other columns'-function in Power Query. Select the userID column in power query, and unpivot other columns. This will give you a structure that can be handled in Power BI. E.g. if you get a new video, and you have video in the legend of a chart, the new video will show in the legend as soon as the dataset is loaded.

     

    Using the unpivot function results in an attribute column and a value column. You might have to split the value column, as this will contain both text and date.

     

    I am not saying it will be easy to create a report on this dataset, but it will be possible: dataset

    Cheers,
    Sturla

    If this post helps, then please consider Accepting it as the solution. Kudos are nice too.