Forum Discussion

subhendude's avatar
subhendude
Icon for Microsoft Employee rankMicrosoft Employee
4 years ago
Solved

Bind dynamic column to the table

I've a dataset as mentioned below

Please note the column names are dynamic in nature. It changes every week because of the to and from date within the parenthesis. This is blocking to select the field to the table visualization because setting them now will definitely break in next week with the change in the column names.

 

Is there anyway in Power BI to use the same dataset keeping the view intact? Alternative is to use matrix table but wanted to evaluate if it is possible in Power BI without using matrix table.

  • I'd recommend unpivoting the columns other than Products to prevent having to deal with dynamic column names (and then, yes, use the unpivoted column names as the column headers in a matrix visual).

     

    Having an unstable table structure (dynamic column names) is likely to cause lots of trouble keeping a report up-to-date. Avoid if at all possible.

1 Reply

  • I'd recommend unpivoting the columns other than Products to prevent having to deal with dynamic column names (and then, yes, use the unpivoted column names as the column headers in a matrix visual).

     

    Having an unstable table structure (dynamic column names) is likely to cause lots of trouble keeping a report up-to-date. Avoid if at all possible.