Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
3 years ago

Column matrix filter

Hello:

I have the following matrix:

I have the numerical values in the columns of an excel sheet as follows:

What I am looking for is to be able to filter that the matrix only shows me the information in the columns for the categories you select in filter # 1.

Filter # 1 is a list of all categories but has no relation to the matrix, (surely that's why it does not work).

Try to put a filto # 2 by selecting the same field from the matrix but what it shows me are the numerical values and not the name of the category I am looking to filter.

That is, if in filter # 1 or # 2 I select Dairy-Culinary, I would expect that in the matrix I only show the information of Dairy-culinarios.

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Syndicate_Admin ,

     

    According to your description, here are my steps you can follow as a solution.

    (1) This is my test data.  

    (2) We can create a new table.

     

    SlicerTable = {"VALOR","Coffee","Confectionery","Dairy-Culinarios"}

     

    (3)Then we can create a measure. 

     

    Selected Measure = 
    VAR __selected = SELECTEDVALUE ( SlicerTable[Slicer] )
    RETURN
    SWITCH ( __selected,
      "Coffee", SUM ( 'Table'[Coffee] ),
      "Confectionery", SUM ( 'Table'[Confectionery] ),
      "Dairy-Culinarios", SUM ( 'Table'[Dairy-Culinarios] ),
      "VALOR",SUM('Table'[VALOR])
    )

     

    (4) Then the result is as follows.

    Or you can create a field parameter instead of creating a new table and then create a measure, please refer to my pbix.

     

    Best Regards,

    Neeko Tang

    If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly.