Forum Discussion
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
Community 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:
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.- AnonymousNot 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 Name Sandwiches Sold Cakes Sold Drinks Sold Store 1 3 1 5 Store 2 5 4 8 Store 3 2 3 10 Store 4 0 3 7 My data is currently stored like this:
Restaurant Name Variable Attribute Store 1 Sandwiches Sold 3 Store 1 Cakes Sold 1 Store 1 Drinks Sold 5 Store 2 Sandwiches Sold 5 Store 2 Cakes Sold 4 Store 2 Drinks Sold 8 Store 3 Sandwiches Sold 2 Store 3 Cakes Sold 3 Store 3 Drinks Sold 10 Store 4 Sandwiches Sold 0 Store 4 Cakes Sold 3 Store 4 Drinks Sold 7 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.