• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Slicer and Option button for Sorting Data|Dashboards & Charts|Excel Forum|My Online Training Hub

You are here: Home / Slicer and Option button for Sorting Data|Dashboards & Charts|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumDashboards & ChartsSlicer and Option button for Sortin…
sp_PrintTopic sp_TopicIcon
Slicer and Option button for Sorting Data
Avatar
Eddie Morgan

Active Member
Members
Level 0
Forum Posts: 4
Member Since:
March 24, 2021
sp_UserOfflineSmall Offline
1
March 24, 2021 - 2:03 am
sp_Permalink sp_Print sp_EditHistory

Hello Mynda,

I hope this message finds you well.

First off, let me state that your dashboard tutorials are insightful and thank you for your dedication.

I have a question about slicers and options buttons. I would like to make my slicer respect the options buttons when sorting each column of data into either "ascending" or "descending" order. Is there a formula or DAX measure you could share that will be useful?

A copy of the image is attached.1616515215641_Slicer-and-Option-Button-Image-1.PNGImage Enlarger

 

Thank you. 

Warmest Regards,

Eddie

sp_PlupAttachments Attachments
  • sp_PlupImage 1616515215641_Slicer-and-Option-Button-Image.PNG (4 KB)
  • sp_PlupImage 1616515215641_Slicer-and-Option-Button-Image-1.PNG (4 KB)
Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4447
Member Since:
July 16, 2010
sp_UserOnlineSmall Online
2
March 24, 2021 - 9:58 am
sp_Permalink sp_Print

Hi Eddie,

Welcome to our forum!

The sort order of the items displayed in the Slicer is set in the model using Sort By. It's not something that can respond to a option button.

Perhaps a workaround is to duplicate the field you want to sort and insert a Slicer for both fields. Have one Slicer sorted in ascending order and another in descending order. Overlay them on top of one another so you can only see the top Slicer. Then write some VBA to surface the relevant Slicer to the top when the option button is selected.

Mynda

Avatar
Eddie Morgan

Active Member
Members
Level 0
Forum Posts: 4
Member Since:
March 24, 2021
sp_UserOfflineSmall Offline
3
March 24, 2021 - 5:06 pm
sp_Permalink sp_Print

Hi Mynda,

Thank you for the swift response.

Would you be so kind to share how to use the Sort By function you mentioned? I saw a "Slicer_Sort_By" when attempting to write a formula, but it generated an error. 

One of your Dashboard GIFs had Option buttons and a slicer for sorting columns of data, hence the question.

If not, I totally understand, and I would work on writing a VBA code to surface the relevant slicer.

Thanks once again.

Warmest Regards,

Eddie

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4447
Member Since:
July 16, 2010
sp_UserOnlineSmall Online
4
March 24, 2021 - 7:58 pm
sp_Permalink sp_Print

Hi Eddie,

I'm starting to wonder if I've correctly understood what you're wanting to do. You said "I would like to make my slicer respect the option buttons when sorting each column of data into either "ascending" or "descending" order". From this I assumed that you wanted to change the sort order of the items displayed in the Slicer shown in your screenshot (Job Title, Name, Years of Service), when the radio buttons are selected. i.e. The Slicer displays the items as follows:

In ascending order:

  • Job Title
  • Name
  • Years of Service

In descending order:

  • Years of Service
  • Name 
  • Job Title

However, I'm starting to think that's not what you meant. Perhaps you could clarify what you're after, so I know if I'm on the right track.

Mynda

Avatar
Eddie Morgan

Active Member
Members
Level 0
Forum Posts: 4
Member Since:
March 24, 2021
sp_UserOfflineSmall Offline
5
March 25, 2021 - 12:03 am
sp_Permalink sp_Print sp_EditHistory

Hi Mynda,

Thanks for the response once again, and apologies for the confusion.

I have attached a screenshot of one of your dashboards for clarification.

On the Region Dashboard, how did you create the table on the far left with the Option buttons for sorting and slicer as headings for the table underneath?

Looking forward to your earliest response.

Warmest Regards,

Eddie

sp_PlupAttachments Attachments
  • sp_PlupImage VideoCapture_20210322-143310-1.jpg (55 KB)
Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4447
Member Since:
July 16, 2010
sp_UserOnlineSmall Online
6
March 25, 2021 - 9:02 am
sp_Permalink sp_Print

Ah, I teach that to my Excel Dashboard course members. I use the SORTBY function to sort based on the item selected in the Slicer. If you don't have Microsoft 365 and the SORTBY function, then there is another approach, but it's more complex. I suggest you take my course and you can learn step by step.

Mynda

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Mynda Treacy, Kristine Storti, Shanna Henseler, Stacy Culpepper
Guest(s) 8
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
John Chisholm
vexokeb sdfg
John Jack
Malcolm Toy
Ray-Yu Yang
George Shihadeh
Naomi Rumble
Uwe von Gostomski
Jonathan Jones
drsven
Forum Stats:
Groups: 3
Forums: 24
Topics: 6212
Posts: 27237

 

Member Stats:
Guest Posters: 49
Members: 31889
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.