Forum Discussion

Sammy_62's avatar
Sammy_62
New Member
4 years ago

Filtering by data tables

I have 6 tables with the same columns but diffrents set of data, currently I'm visualizing 1 table, and what I need is to have a slicer that I can use to select the table and the visualization should change acording to the new data set. I tried to create a table with the name of the other tables and create a relationship with the other tables, but I couldn't view the new visualization it's only blank.

1 Reply

  • Combining the data tables into a single table would seem to be the easiest.

    IN Power Query

    -For each data table, create a column that has a table identifier.
    Ie. For Table 1: _Table = 1
    -Append the data tables into a new table (Combined).
    -Disable load for the original data tables.

    IN PBI
    -Create a table that is a list of your original data tables (Tables).
    -Create a slicer using the Tables table. (changing the slicer to Single Select might help)
    -In any measures, you’ll need a line like
    'Combined'[_Table] = SELECTEDVALUE( 'Tables'[Table] )

    For example:

    Table Sales =
    CALCULATE(
    SUM( Combined[Sales] ),
    'Combined'[_Table] = SELECTEDVALUE( 'Tables'[Table] )
    )

    https://1drv.ms/u/s!AnF6rI36HAVkhPE4w0h-rGK47Qv-wA?e=PZFrnP