Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Long-thin data and slicers

I have a long-thin data set, and I'm trying to use slicers to filter a matrix visualisation.

 

I would like to have a slicer for each variable, to allow users to show, for example, only rows that have a value of between 10 and 20 for variable A.

 

Initially, I've tried applying a filter to my slicer to restrict it to only one variable (in my example, variable A), but adjusting the value of the slicer still filters every single value in the matrix, rather than only filtering the values for the single variable.

 

Apologies if I'm struggling to describe my issue; I think essentially what I want is to have a slicer filter based on the values in two columns of my table, one of which is set (the attribute) and the other the user can adjust.  Essentially, the slicer should be finding records where the Attribute = X and the Value = Y, but I can't figure out how to do that.

 

Any advice?

2 Replies

  • v-easonf-msft's avatar
    v-easonf-msft
    Icon for Community Support rankCommunity Support

    Hi , Anonymous 

    If I understand correctly, you can try to create a grouping column as below:

    1.right click the field ,and select "New group"

     

    2.select  the values to group

     

    3.Add the new field(groups) to slicer

     

    Here  is a sample I made :

    Url:

    https://wicren-my.sharepoint.com/:u:/g/personal/michael_wicren_onmicrosoft_com/EVAv55Xv8D1PkywEkWXm8KUByfB8ckQ4csDOHHw0FxOQ1Q?e=7notBX 

     

    Best Regards,
    Community Support Team _ Eason
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi,

       

      Thanks for the response; I've had a look at Grouping, but, unfortunately, I don't think it's resolving my issue.

       

      Grouping allows me to group values from a single field together, but my issue is that I have a long-skinny dataset where data is stored in Variable-Value pairs.

       

      I want a slicer to be able to slice my data based on the values for all rows that contain a specific variable, if that makes sense.

       

      For example, a standard table might be

       

      Restaurant NameSandwiches SoldCakes SoldDrinks Sold
      Store 1315
      Store 2548
      Store 32310
      Store 4037

       

      My data is currently stored like this:

       

      Restaurant NameVariableAttribute
      Store 1Sandwiches Sold3
      Store 1Cakes Sold1
      Store 1Drinks Sold5
      Store 2Sandwiches Sold5
      Store 2Cakes Sold4
      Store 2Drinks Sold8
      Store 3Sandwiches Sold2
      Store 3Cakes Sold3
      Store 3Drinks Sold10
      Store 4Sandwiches Sold0
      Store 4Cakes Sold3
      Store 4Drinks Sold7

       

      I know that I could transpose my data and put it in the traditional wide format, and I'd be able to get what I want from slicers, but the advantage I've found of the long-thin set-up is that it allows users to select the fields they actually want to see in a visual dynamically, so in a Matrix based on the above, users can use a slicer to only show Cakes and Drinks, for instance.

       

      The problem I'm running into is if I create a slicer which includes the Attribute field, it then slices based on all the values in that field, even when I apply a filter to it based on a specific Variable.  So, for example, I create a standard slicer with the Attribute field, but then apply a Visual-level filter, restricting it only to the "Sandwiches Sold" variable, but it still filters based on all the values in the Attribute column.