Forum Discussion

R_K_Damera's avatar
R_K_Damera
Frequent Visitor
2 years ago
Solved

Column Name Changes Every Month

Hello Everyone,    This Data set has multiple columns where in Column 7 to Column 12 gets refreshed ever month.  Example : For this month data starts from Jan 2023 to June 2023                  F...
  • MattAllington's avatar
    2 years ago

    The correct approach is to

    • promote the first row as column headers
    • delete any "changed type" step if it is auto created
    • select all columns (I assume all others) except for the columns that are month names and unpivot other columns

    this will create a table of data that is independent of any month column names. You can rebuild the columns using a matrix. 

  • Anonymous's avatar
    Anonymous
    2 years ago

    MattAllington Thanks for the contribution on this thread.

    Hi R_K_Damera ,

    I recommend following MattAllington ’s method, which involves transforming the date column into a column value using the unpivot operation. 

    Additionally, consider changing your table visual to a matrix and placing the months in the Columns option of the matrix. This approach ensures that even if the data refreshes monthly, the visual won’t encounter errors related to missing start month columns from previous months.

    Best Regards

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi R_K_Damera ,

    You can refer the following blog to sort the column by custom:

    Sort a Column with a Custom Order in Power BI - RADACAD

    1. Create a customized sort order dimension table

    Quarter Year Order
    Jan 2023 1
    Feb 2023 2
    Mar 2023 3
    Apr 2023 4
    ... ...

    2. Combining the Sort Order Table with your fact table

    3. Sort by column

    Best Regards