Forum Discussion

j0710's avatar
j0710
Frequent Visitor
2 years ago
Solved

Dynamically Expanding Table in Power BI Based on Slicer Selection

In my Power BI report, I have encountered a challenge where I need the table to dynamically expand based on the values selected in a slicer. Here's the scenario:

 

 

  1. Initial Table Configuration: I have converted the table into "Unpivoted Other Columns" to allow users to control which columns they want to view in the reports. This enables flexibility for users to choose the columns they are interested in.

  2. Slicer for Column Selection: I have added a slicer named "All Columns" that displays all available columns to the user. The user can select the columns they want to view in the table.

  3. Matrix Chart Configuration: In a matrix chart, I have set "Main Channel" as rows and "Value" as the values to be displayed. This matrix chart provides an overview of data based on the selected columns.

  4. Challenge: When a user selects "All Columns" in the slicer, only the first values of the selected columns are displayed in the table. However, I want the table to dynamically expand to show all values of the selected columns.

  5. Solution Needed: I am seeking assistance from the Power BI community to find a solution to dynamically expand the table based on the values selected in the slicer. I want the table to adjust its size and display all values of the selected columns when "All Columns" is selected in the slicer.

Any insights or suggestions on how to achieve this dynamic expansion of the table would be greatly appreciated.

Thank you in advance for your help!
mail ID : [email protected]

  •  olgad 

    Dear Olga Dontsova,

    I wanted to take a moment to express my sincere gratitude for your assistance,
    Your solution was incredibly helpful and provided valuable insight that has greatly benefited me in my work.

    Thank you once again for your support and assistance.
    It is community members like you who make the Power BI community such a valuable resource for learning and collaboration.
    pls connect linkedin : ) 
    linkedin.com/in/jackson-s-652396240

  •  "
    I would do it differently. No unpivoting, leave the columns as they were. 

    Do you know field parameters? Modelling-New Parameter-Fields then pick all your columns that you would like to display. 
    Use this field parameter as a slicer and place it into the table. Can it be the table?? Matrix always summarizes, in your case it always took the first value. Why matrix shall be used?? 

     "

     

    this solution by olgad 

5 Replies

  • j0710's avatar
    j0710
    Frequent Visitor

     olgad 

    Dear Olga Dontsova,

    I wanted to take a moment to express my sincere gratitude for your assistance,
    Your solution was incredibly helpful and provided valuable insight that has greatly benefited me in my work.

    Thank you once again for your support and assistance.
    It is community members like you who make the Power BI community such a valuable resource for learning and collaboration.
    pls connect linkedin : ) 
    linkedin.com/in/jackson-s-652396240

    • olgad's avatar
      olgad
      Icon for Resident Rockstar rankResident Rockstar

      Thank you for you nice words and feedback.

  • Anonymous's avatar
    Anonymous
    Not applicable

    HI j0710,

    In fact, the value field is used on the matrix value field which only support to show the aggregate values.

    If you want to show all match values. I'd like to suggest you create a measure formula with concatenatex function and replace the raw value field on the matrix.  It will show a text string with all matched value that concatenated by delimiter.

    CONCATENATEX function (DAX) - DAX | Microsoft Learn

    Regards,
    Xiaoxin Sheng

  • j0710's avatar
    j0710
    Frequent Visitor

     "
    I would do it differently. No unpivoting, leave the columns as they were. 

    Do you know field parameters? Modelling-New Parameter-Fields then pick all your columns that you would like to display. 
    Use this field parameter as a slicer and place it into the table. Can it be the table?? Matrix always summarizes, in your case it always took the first value. Why matrix shall be used?? 

     "

     

    this solution by olgad 

  • The Field Parameters solution in the accepted answer is the right approach  much cleaner than unpivoting. One thing to add: Field Parameters work well for switching between fields, but they don't support showing a field AND its comparison value side by side dynamically (e.g., Revenue + Revenue vs Last Year in the same row).

    For tables where users need to select which columns to show AND add variance between selected columns  all in the published report  Flexa Tables on AppSource combines both: column show/hide via field picker + built-in variance between any two columns