Forum Discussion

PowerKoen's avatar
PowerKoen
Frequent Visitor
6 years ago

Show multiple values in table/matrix

Hi there,

 

Got an table sales with the following columns:

 

Sales[ID]

Sales[Names]

 

In an matrix/table visual i want to show the following:

 

IDNames
1No name
2April
3Ben

 

 

IF, the filter ID (on filter pane) has an selected value it must show ALL the values of sales[names]. 

But when no ID ( on filter ) is selected, it must show ALLEXCEPT the value 'no name' of sales[names]

 

I tried the following:

 

IF ( hasonevalue sales[ID], 
calculate ( allselected sales[names] , ALL ( sales[names]) ,
calculate ( allselected sales[names],  'all other columns, except no names' )

And all in between, with values and selected, but its not working.

 

Can anybody help? 

 

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    PowerKoen 

    1. once you select a value for example 2 in the filter panel, the table visual automatic shows the Name that corresponding to ID 2. It is impossible to show all names. 

    2. when no ID is selected in the panel, the table visual shows all name in table. It is not possible to achieve your demand of remove "no name" from the list.

     

    BTW, this measure removes "no name" from the list :
    measure= CALCULATE(MAX('Table'[Names]),FILTER('Table','Table'[Names]<>"No Name"))


    Or I misunderstood your question,  maybe provide an image view of your expected result.

     

    Paul Zheng

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

    • PowerKoen's avatar
      PowerKoen
      Frequent Visitor

      Thanks for your anwser, and yes I think I need to elloborate more.

       

      In the table/matrix, when NO ID is selected. It must show all but not 'no name'.

      Can maybe do this with 

      measure= CALCULATE(MAX('Table'[Names]),FILTER('Table','Table'[Names]<>"No Name"))

      But when an ID is selected (in filter pane), it must show ALL, so also 'no name' values.

       

      Tried combining the measurement with selected / hasonevalue etc, but no succes so far. 

      • Anonymous's avatar
        Anonymous
        Not applicable

        PowerKoen 

         

        Unfortunately, after a plenty of research and tests it is still impossible to do that.

        BTW, I don't see the logic of your use of filter to see all values, because filter is used to see the specific values. 

         

        My suggestion would be make your model like the follow:

        1. when NO ID is selected. It show all include "no name"

        2. create a  flag for Name column, using "Name" and "No Name", when "Name" is selected show all names except "no name".

         

        Best, regards

        Paul Zheng