Forum Discussion

TViljoen's avatar
TViljoen
Regular Visitor
2 years ago
Solved

Dynamic Grouping based on a slicer

Hi There

 

I have a slicer with the Customer Name and then a Values Column Based on the Sales Value of each customer.

 

What I want to do is select a few Customers from a slicer and then Their Sales Values will show on a visual, but all the other Customers (Not Selected) must also show 

Thus : 
1. Select Cust1, Cust3 from slicer

2. in Visual Cust1 and Cust3 Data is shows (With Legend showing their Names) and then a Third Legend unit (Other) for the sum of all the rest)

 

Anybody have any Ideas?

7 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi TViljoen ,

    Based on your requirements, I firstly create a table.

    Then I create a new table.

     

    Table 2 = VALUES('Table'[Name])

     

    Also I create a measure.

     

    Measure =
    IF (
        SELECTEDVALUE ( 'Table'[Name] ) IN VALUES ( 'Table 2'[Name] ),
        BLANK (),
        SUM ( 'Table'[Sales] )
    )

     

    Finally when we select the Cust we want, the unselected will also be shown.

     

     

     

    Best Regards

    Yilong Zhou

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

    • TViljoen's avatar
      TViljoen
      Regular Visitor

      Hi Anonymous 

      This is almost what I need, 

       

      The only thing is that, i need to add therse to a line graph where the selected Cust (Values) as well as their name in the legend. And the Rest (Not selected) is grouped together as lets say: "Other" on the graph

    • TViljoen's avatar
      TViljoen
      Regular Visitor

      Thanks Ashish_Mathur 

       

      This is a great starting point, but When i filter on lets say Violation1 and Violation2:

       

      The Other Value becomes 0 - becasue the measure is then only incorporating the Values of those Two Errors - and thus my Error Other becomes 0

       

      Is there a Way to Pivot Away from the TopN focus, and more on the Spesific Violations Selected?