Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago

Add Column in matrix dynamically in rows category

Hi I have a data like below

Scenario -1 

I have level 1 and level2 till the last level but we are not sure the no'f levels in source. But based on the levels present in my sorce I have created a matrix visual and showing these data in the form of collapse and expansion feature. If we expand level 1 then level 2 data will shown. similarly if we expand level2 then level 3 data should visble. As of now its working fine based on the available data. below the screenshot for your reference.

Requirement:

As of now the source is having 4 levels based on that we are showing those 4 levels in the visual, but in future while doing data refresh may be some columns were added for example level5 and level6 and level7 columns were added in the source but in the visual it is showing only 4 levels the other 3 levels also should get reflected dynamically in the visual without manual intervention in power BI. But during my research and analysis I did not found any cluee for that. Is this can we handle from power BI dynamically if yes please help me to provide the steps how can we achieve this.

 

I need some inputs from experts like you. I really thankful to you four your help in advance. 

 

 

 

 

 

4 Replies

  • Anonymous I don't think it is something you can do dynamically. You have to add all the columns for now, it is all about data prep and modeling, if you expected 3 more columns in the future, just add those right now so that it flows when the new columns are added to the source. 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi,

    Thanks for the solution parry2k offered, and i want to offer some more information for user to refer to.

    hello Anonymous ,  as parry2k mentioned, it cannot add the column to the matrix automatcially, the best way is to  add the columns manually, if you want to add the columns automatcially, you need to change the table format to the following.

    Then create a table visual, put the following field to the viusal.

    Then it will add the level to the visual automatcially.

     

    And you can refer to the following thread.

    Solved: Add columns to a table visual dynamically - Microsoft Fabric Community

     

    Best Regards!

    Yolo Zhu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi,

      Thanks for you reply I tried this approach but customer want the functionality like collapse and expand feature in the form of +/- that we cannot achieve through table visual so that is the concern. I hehard something about through the API it is possible but not tried yet. Please check is it possible to achieve from the API side.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Anonymous 

        Thanks for your reply, It's designed like this, if you want to add a new column to the matrix, you have to do so manually,There is currently no API that provides this functionality

         

        Best Regards!

        Yolo Zhu

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.