Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Dynamic Columns of Data Source

I have a data source having weekly values in it.
Weeks are columns.

Sometimes weeks will be in the range 202310 to 202327 or sometimes it ranges between 202328 to 202347 and varies depending upon the data.
2023 is a year and 10 is week no.

I have created a report using weeks from 202310 to 202327. Now how can we add other weeks?
All processes should be automated.

1 Reply

  • kleigh's avatar
    kleigh
    Responsive Resident

    Firstly, you will need to change the import. By default, some connectors like CSV will add a coulumn count. Since you have a varying number of columns, this must be removed.

     

    If the rest of the columns are fixed, you could try Table.UnpivotOtherColumns which should keep the fixed columns, and convert the varying columns to rows.