Forum Discussion

rhett_h1983's avatar
rhett_h1983
Regular Visitor
6 months ago
Solved

Help with slicer

Hi all.

 

I tried googling this, but I may not be phrasing it correctly.

 

Basically, I'm trying to add a slicer that will highlight age buckets. For example:

1-1011-3030-4545-60
5002000100

 

So if the user wanted to look specifically at the 11-30 bucket, only the 200 would show. If all buckets were selected, it would show the 800 total.

 

The columns in question are, of course, numerical, so if I attempt the buckets (1-10, 11-30, etc.) into the slicer fields, it populates all of the individual amounts, not 1-10, 11-30, etc. I want a grouping of the totals for that bucket when it's selected.

 

Thanks in advance!

  • Hi,

    If that is the raw data, then you need to use the "Unpivot" feature to reshape the data in which all buckets appear in a single column. 

  • Hello rhett_h1983,
    I reproduced your scenario by creating a slicer-only helper table (using Reference + Unpivot) to expose the bucket names, linked it back to the original data and confirmed that the slicer correctly filters the totals without impacting existing visuals.

    For your reference, I’ve attached a .pbix file demonstrating this working end-to-end and thanks, danextian & Ashish_Mathur for sharing valuable insights.

    Best regards,
    Ganesh Singamshetty

10 Replies

    • rhett_h1983's avatar
      rhett_h1983
      Regular Visitor

      They're from fixed decimal number columns, so there are many more rows of similar data in the various buckets.

      • danextian's avatar
        danextian
        Super User

        Transform your data in the query editor. If there are columns that need to be kept as-is, select those columns, right-click then click Unpivot Other Columns otherwise select all columns then Unpivot Columns.

         

  • Hi,

    Please share some data to work with and show the expected result.  Share data in a format that can be pasted in an MS Excel file.

    • rhett_h1983's avatar
      rhett_h1983
      Regular Visitor
      1-1011-3031-4546-60
      5002000100
      3002002000
      100200300400
      20000100

       

      Sure - so in this example, if I drop the 1-10, 11-30, 30-45, and 45-60 columns into slicer fields, what I want is a dropdown/list of 1-10, 11-30, 30-45, and 45-60. Then, if the user selected 1-10, it would update the charts (stacked bar chart) on the tab by removing the other three buckets, leaving the 1,100 total that's in the 1-10 bucket.

       

      Instead, if I drop 1-10 in the field, I'm getting 100, 200, 300, and 500 (the individual cells in the 1-10 column) as my slicer options.

       

      Hope this helps!

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Super User

        Hi,

        If that is the raw data, then you need to use the "Unpivot" feature to reshape the data in which all buckets appear in a single column. 

  • v-ssriganesh's avatar
    v-ssriganesh
    Community Support

    Hello rhett_h1983,
    I reproduced your scenario by creating a slicer-only helper table (using Reference + Unpivot) to expose the bucket names, linked it back to the original data and confirmed that the slicer correctly filters the totals without impacting existing visuals.

    For your reference, I’ve attached a .pbix file demonstrating this working end-to-end and thanks, danextian & Ashish_Mathur for sharing valuable insights.

    Best regards,
    Ganesh Singamshetty

  • v-ssriganesh's avatar
    v-ssriganesh
    Community Support

    Hello rhett_h1983,

    We hope you're doing well. Could you please confirm whether your issue has been resolved or if you're still facing challenges? Your update will be valuable to the community and may assist others with similar concerns.

    Thank you.

     

  • v-ssriganesh's avatar
    v-ssriganesh
    Community Support

    Hello rhett_h1983

    Could you please confirm if your query has been resolved by the provided solutions? This would be helpful for other members who may encounter similar issues.

     

    Thank you for being part of the Microsoft Fabric Community.