Forum Discussion

R_K_Damera's avatar
R_K_Damera
Frequent Visitor
2 years ago
Solved

Power BI column dynamically need to added

This is input excel sample data for 5 months, for the data I am using table visual. In this visual I have placed al the column in the visual and I was able to get table visual however one month column gets added every month( new month geta added and old month gets removed out of data) as the result newly added column is not getting added or present in the table visual dynamically my visual is breaking down I need place new changed column manually into visual

 

Example : we have data for Apr 2023 to Aug 2023 & in next month input data will be from May 2023 to Sep 2023. The report started from may to sep where in Sep newly added column which is not getting added dynamically into visual. 

I need manually add Sep 2023 to visual

  • Hi R_K_Damera - you have to create two calculated columns based on Month No and Month Name

    first calculated column:

     

    Month = FORMAT(Pivot[Date],"mmm")
     
    Monthno = MONTH(Pivot[Date])
     

    Once added the new columns, go to the report view and use matrix visualization, add Month Name on Columns and Data is on Rows and Values on Values tab.

     

     

    Above is the output you can get it. Please check

     

    Did I answer your question? Mark my post as a solution! This will help others on the forum!
    Appreciate your Kudos!!

     

6 Replies

  • Hi R_K_Damera - you can do this in power query editor, select the columns which you no need to do unpivot, please follow the steps as below:

     

     

    Once you unpivoted other columns , you can see attributes and values and then convert to date datatype and rename it as Date.

     

    Once you loaded the data into power bi desktop, you can easily develop and get the dates dynamically into visualization. no need to add manual entry as like below visualization.

     

     

    Let me know if any . solution works as expected.

     

     

    Did I answer your question? Mark my post as a solution! This will help others on the forum!
    Appreciate your Kudos!!

      • rajendraongole1's avatar
        rajendraongole1
        Super User

        Hi R_K_Damera - you have to convert text data type to date data type. if any issues while converting we have to use the m functions . check it and get it convert let know if any errors are coming.

         

         

         

        change data type 

         

         

        Did I answer your question? Mark my post as a solution! This will help others on the forum!
        Appreciate your Kudos!!