Forum Discussion

hipojoel's avatar
hipojoel
New Member
4 years ago

Slicer Value

Is there a way you can add the count in the Filter Pane as part of the Slicer Value?

In the Image below, it shows the basic Slicer Value.

What I am trying to do is add the count in the Filter Pane as part of the Slicer Value so that it would show as

Apples (3)

Grapes (1)

Oranges (3)

Pears (3)

 

7 Replies

  • Samarth_18's avatar
    Samarth_18
    Community Champion

    Hi hipojoel ,

     

    Create a new column like below and use it slicer:-

    Prodct_count =
    [Product] & "("
        & CALCULATE (
            COUNT ( 'Table'[Product] ),
            'Table'[Product] = EARLIER ( 'Table'[Product] )
        ) & ")"
    

     

    Output:-

    Thanks,

    Samarth

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi,can use this :

    1.Build a table and connect the relationships :

    Fruits = VALUES('Sheet1'[fruit])
    2.Re-create columns :
    Filter = 'Fruits'[fruit] & "(" & CALCULATE(COUNT(Sheet1[fruit]),ALLEXCEPT(Fruits,Fruits[fruit])) & ")"

     

  • Thank you for the response.

    Now for the tricky part.

    The image below shows the fruit Product are then filtered by Customer ID and now the Filter Pane shows the count for each type of fruits changed.

    How can I get the number change to show the same count in the Filter Pane, so it would show as

    Apples (1)

    Grapres (1)

    Oranges (1)

    Pears (1)

    So the count will dynamically changed based on the filtered Customer ID 

    • Samarth_18's avatar
      Samarth_18
      Community Champion

      Hi hipojoel , Could you please share your sample data in text format(not a screenshot) with expected output. Since these calculation cant be made dynamic with custom column so I can try to find out some work around if you share sample data.

      • hipojoel's avatar
        hipojoel
        New Member

        Here's the sample data

        CustomerID,Product
        1,Apples
        1,Grapes
        1,Oranges
        1,Pears
        2,Apples
        2,Oranges
        2,Pears
        3,Apples
        3,Oranges
        3,Pears

  • That's what I'v read during my research. 

    Thank you for time and effort, appreciate it very much.