Forum Discussion

paul-maessen's avatar
paul-maessen
Icon for Resolver I rankResolver I
5 years ago
Solved

Limit the SelectionId for a table view data-mapping to just one column instead of a row.

Hi,   I am developing a Custom Visual using a table view datamapping. When selecting one row of the table my current visual now selects the whole row because I have created the selectionId's using ...
  • dm-p's avatar
    5 years ago

    Hi

    The table data view mapping is not designed for such granular use and as such, is one of the limitations of using it. I'm running into similar challenges with a  visual I'm working on.

    You get the same results with selections if you use a core table visual and as such I always 'audition' my datasets in a table visual first if I'm planning to use the table data view mapping, in order to make sure this limitation is workable for me. If you want to filter by a particular data role then you would need to use the categorical data view mapping.

    If you absolutely have to use the table data view mapping, the only way I'm aware of to make this work - and it's hacky -is to:

    • Isolate the value of the category you want to filter on
    • Filter your dataset for all rows matching this value
    • Add these selection IDs to an array
    • Apply this array to the selection manager rather than a single ID

    Please note however, that this is not perfect, as the selection IDs will still contain a tuple of all colums and measures that are in each row and the selection manager will still apply this to other visuals.

    Regards,

    Daniel