Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Dynamic column selection for matrix visual

hi   i have the columns along with calculated measures in the matrix visual . currently everything is static and matrix visual as a scroll and it is becoming hard for the users to come up with the ...
  • MFelix's avatar
    7 years ago

    Hi Anonymous ,

     

    To what I can understand you want to have an option for users to select columns that they see on the matrix table that is not an option you have on PBI by default however you can create a workaround.

     

    Create an unrelated table with all your Columns Names that you want to have as on off on your matrix.

     

    In my case I created a table named Selector:

    Columns selection

    Quantity
    Value

     

    Then add the following measures:

    Column selection = MAX(Selector[Columns selection])
    
    Totals Columns = SWITCH([Column selection];"Quantity";[Quantity total];"Value";[Value total])

    On the second measure you should add all the related measure that you have for each column you want to show.

     

    Now create your matrix in the following way:

    Rows: Category (this are the columns that you want to have the details (keep the ones you have)

    Columns: Selector[Columns Selection]

    Values: [Totals Columns]

     

    Should give the result below:

     

    See attach PBIX.

     

    Regards,

    MFelix