Forum Discussion

PBIuser73's avatar
PBIuser73
Helper II
1 year ago
Solved

Automatically add new fields in dataset to visualisation

Hi. 
I have a table like this:

ProjectTypeNumberVurd
AXX1Character1
AXX2Character2
AXX2Character3
BYY1Character3
BYY2Character4
BYY3Character6
CXX3Character2
CXX1Character3
CXX1Character4


The dataset will increase all the time (and column Vurd can get other values).

I pivot this dataset in PowerBi using Transform and Pivot function. 
Then the dataset looks like this:

ProjectTypeCharacter1Character2Character3Character4Character6
AXX122  
BYY  123
CXX 311 


 And the dataset will look like this in powerbi:


If i get more rows in dataset and a row with Vurd Character8 is added, it will create a new column in dataset. 
This works automatically and perfect. 

So my question is:
Is it possible to automatically add those new columns in the visualisation?  



  • Hi PBIuser73 ,
    I see you are facing a problem with automatically add new fields in dataset to visualisation. No, Power BI does not automatically update the visual with new columns from the Pivot when new data introduces them.

    When you pivot data (using Power Query), each new value in the Vurd column (like Character8) becomes a new column.
    But in Power BI visuals, fields (columns) must be manually added to the visual.

    Even though the data model updates, the visualization structure is static unless manually changed.

    Workaround Options

    1. Unpivot + Matrix Visual

    Instead of pivoting, keep data normalized and use a Matrix visual:

    • Keep columns: ProjectType, Number, Vurd

    • Put:

      • Rows: ProjectType

      • Columns: Vurd

      • Values: Count or Sum of Number

    Now, when new Vurd values appear, they’ll automatically show up as new columns in the matrix visual.

    You will now see a dynamic matrix like:

     


    2. Dynamic Measure Table (Advanced)

    If pivoting is required and you want full control:

    • Create a measure for each Vurd (e.g., Character1 Count)

    • Then use field parameters to toggle or display selected columns.

    But this still doesn’t auto-detect new columns without updating the report manually.

    Hope this solution helps you make the most of Power BI! If it did, click 'Mark as Solution' to help others find the right answers.
    💡Found it helpful? Show some love with kudos 👍 as your support keeps our community thriving!
    🚀Let’s keep building smarter, data-driven solutions together! 🚀

5 Replies

  • Hi PBIuser73 ,
    I see you are facing a problem with automatically add new fields in dataset to visualisation. No, Power BI does not automatically update the visual with new columns from the Pivot when new data introduces them.

    When you pivot data (using Power Query), each new value in the Vurd column (like Character8) becomes a new column.
    But in Power BI visuals, fields (columns) must be manually added to the visual.

    Even though the data model updates, the visualization structure is static unless manually changed.

    Workaround Options

    1. Unpivot + Matrix Visual

    Instead of pivoting, keep data normalized and use a Matrix visual:

    • Keep columns: ProjectType, Number, Vurd

    • Put:

      • Rows: ProjectType

      • Columns: Vurd

      • Values: Count or Sum of Number

    Now, when new Vurd values appear, they’ll automatically show up as new columns in the matrix visual.

    You will now see a dynamic matrix like:

     


    2. Dynamic Measure Table (Advanced)

    If pivoting is required and you want full control:

    • Create a measure for each Vurd (e.g., Character1 Count)

    • Then use field parameters to toggle or display selected columns.

    But this still doesn’t auto-detect new columns without updating the report manually.

    Hope this solution helps you make the most of Power BI! If it did, click 'Mark as Solution' to help others find the right answers.
    💡Found it helpful? Show some love with kudos 👍 as your support keeps our community thriving!
    🚀Let’s keep building smarter, data-driven solutions together! 🚀

    • PBIuser73's avatar
      PBIuser73
      Helper II

      I tried to use your alternative 1. And it did what i expected. But is it possible to make a new column to the right as a average of the values in all columns?
      Like this:

       



      • GrowthNatives's avatar
        GrowthNatives
        Super User

        Thanks! and about calculating averages across all character columns per row.

         

        🛠️ Use DAX to calculate average per ProjectType

        1. Create a DAX measure for row-level average

        Average by Project =
        VAR ThisProject = SELECTEDVALUE('YourTable'[ProjectType])
        VAR Total = 
            CALCULATE(SUM('YourTable'[Number]), ALLEXCEPT('YourTable', 'YourTable'[ProjectType]))
        VAR CountVurd = 
            CALCULATE(DISTINCTCOUNT('YourTable'[Vurd]), ALLEXCEPT('YourTable', 'YourTable'[ProjectType]))
        RETURN
            DIVIDE(Total, CountVurd)

        🔍 This counts the number of unique characters (Vurd) per ProjectType and divides the total to get the average.


        2. Add this measure to the Matrix visual

        • Add Average by Project as a value in the matrix.

        • Right-click it → "Show on rows" = Off so it appears as a new column to the right.

        This will give you:

        ProjectType Character1 Character2 Character3 ... Total Average

        A122...51.67
        B......... 62.00
        C......... 72.33

         

        Hope this solution helps you make the most of Power BI! If it did, click 'Mark as Solution' to help others find the right answers.
        💡Found it helpful? Show some love with kudos 👍 as your support keeps our community thriving!
        🚀Let’s keep building smarter, data-driven solutions together! 🚀 [Explore More]