Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Slicer to Exclude

I have the original dataset as below

IDDayIDAmountType
1112A
1140B
1310A
1320C
2330D
2440A
2350C
3460B
3470C

 

I have created a summarised table grouped by ID and DayID

IDDayIDSumAmount
1152
1330
2380
2440
34130

 

Now I want to be able to use a slicer filter with 'Type' options from the original table to filter 'SumAmount' in the summarised table. I want to exclude the ticked 'Type' option from the summarised table. For example

If I tick 'Type' A in the slicer, the summarised table should look like:

 

IDDayIDSumAmount
1140
1320
2380
34130

 

Can anyone please help with how I can do this?

  • BA_Pete's avatar
    BA_Pete
    4 years ago

    Anonymous ,

     

    Ok, I see.

    In that case, I would create a [groupID] column by merging the [ID] and [DayID] fields in the unsummarised table ('table').

    Then reference this table to create your summarised table ('summTable') by grouping on [ID], [DayID], [groupID], and SUM[Amount].

    Send to model and relate table[groupId] to summTable[groupID]. Change relationship filter direction to BOTH.

    Use table[Type] as your slicer field, summTable[Amount] (bins) as your X axis, and COUNTROWS(summTable) as your frequency measure on Y axis.

     

    *NOTE* Ensure you understand the behaviour of this model setup. Using an unsummarised dimension to filter summarised data may give you unexpected results i.e. the single [Type]s selected in the slicer will output entire summarised groups, not just values specifically related to that [Type].

     

    Pete

7 Replies

  • Hi Anonymous ,

     

    The simplest way to do this:

     

    Do not summarise your table and keep all the fields.

    Create a measure: SUM(yourTable[Amount]).

    Put [ID], [DayID], and your new measure into your visual.

    Set up your [Type] slicer with the 'Select All' option on, and turn off 'Multi-select with CTRL' option. Then the end user can select all slicer values and deselect the one(s) they don't want.

     

    Pete

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Pete,

       

      Unfortunately I can't do that as I have to make a histogram out of the summarised table.

      • BA_Pete's avatar
        BA_Pete
        Super User

        Hi Anonymous ,

         

        The unsummarised table structure will still work fine for a histogram, just put only [ID]and [DayID] on the axis and use your measure for Values. Alternatively, you can right-click on fields in the Fields list and select 'New group' to bin your values however you like.

         

        Perhaps I'm misunderstanding your use case?

         

        Pete