Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 months ago

Dynamic Table Columns Based on Table Name Slicer

Hi all,

 

I have a scenario in Power BI and need some guidance:

Scenario:

  • I have 10-12 different tables at source.

  • Each table has different columns (not the same schema).

  • I want to create a single visual (table/matrix) in Power BI where:

    1. There is a slicer with the table names.

    2. When a user selects a table from the slicer, the visual dynamically shows the columns of that selected table.

What I’ve tried:

  • I considered unioning the tables in Power Query, but the tables have different columns, so that didn’t work.

  • I also looked at Field Parameters, but that only works when columns are identical.

Challenge:

  • Power BI table/matrix visuals require columns to be predefined. I need the columns to change dynamically based on slicer selection, which seems unsupported natively.

Questions:

  1. Is it possible to achieve a fully dynamic table where columns change based on slicer selection?

  2. If not, what’s the best workaround in Power BI for this scenario?

  3. Are there any custom visuals that can solve this?

I’d really appreciate guidance, examples, or links to similar scenarios.

 

Thanks in advance!

7 Replies

  • Anonymous , Create field Parameters, edit manually if needed for column name. Add a new calculated column Table name, now you can use that with table name filter 

    Please check the attached file after the signature 

    Table name remove single can be there inside SUBSTITUTE, also I have manually added last two rows

    • Anonymous's avatar
      Anonymous
      Not applicable

      And then can it be used it in a table visual ? or a matrix visual?
      Also will the field parameter work here, because in each source table, I have different columns, and I need to display the exact replica of that column, as per selection of the table from slicer?

      • amitchandak's avatar
        amitchandak
        Super User

        Anonymous , Please check the attached file after the signature

        Table name remove single can be there inside SUBSTITUTE, also I have manually added last two rows

  • v-echaithra's avatar
    v-echaithra
    Community Support

    Hi Anonymous ,

    Thank you amitchandak  for providing valuable inputs.

    Just following up to see if the Response provided by community members were helpful in addressing the issue. if the issue still persists Feel free to reach out if you need any further clarification or assistance.


    Best regards,
    Chaithra E.

  • v-echaithra's avatar
    v-echaithra
    Community Support

    Hi Anonymous ,

    May I ask if you have resolved this issue? Please let us know if you have any further issues, we are happy to help.

    Thank you.