cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SBuri Resolver II
Resolver II

Dynamic Slicer Based on Filters

Hey,

 

I didn't find an iteration of this that had been answered before. I'm trying to find a way to create a dynamic slicer which determines what options to present the user based on other selections the user makes. I can determine what month counts to show the user via measures, however I cannot put measures into a slicer. Similarly I don't think I can use a custom column because I need the slicer logic to determine what dates to show the user based on filtering selections the user makes after the model is loaded in and complete.

 

Is there a way to dynamically change a slicer based on logical if-then statements?

 

For Ex:

Available Months at Start: All months 2017-2018

User Inputs Filter, Available Months Now: May (first half), June, July, August (last half)

Logic: For each month that has all data, show that month as an option in the slicer

Slicer: June, July

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
SBuri Resolver II
Resolver II

Re: Dynamic Slicer Based on Filters

Thanks for your help Felix!

 

I couldn't get that solution to work however it helped me think of another solution. I created a table with the options available to the user. The table had 2 columns, one column for the title I wanted the user to see as they selected an option, the second column for the variable I wanted to pass into my equations. Then I went to my equation and referenced the value column of the aforementioned table and said to add that value to my equation.

 

Thanks again!

View solution in original post

4 REPLIES 4
Super User III
Super User III

Re: Dynamic Slicer Based on Filters

Hi @SBuri,

 

As you say you cannot create a slicer with a measure, however you can use a measure to filter out a report a page or a visual, in this case I believe that you can use one of two options:

 

  • Place your measure on the page / report filter and then the slicer will be filtered out
  • Create an input page that uses slicer to make the selection and then sync the slicers to other pages with this ones hidden.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

Check out my blog: Power BI em Português


SBuri Resolver II
Resolver II

Re: Dynamic Slicer Based on Filters

Thank you Felix!

 

I'll actually need the dynamic slicer to inform a measure that reflects across different tables and graphs so a visual filter won't work in this case. I'll keep that solution in mind for the future though!

Super User III
Super User III

Re: Dynamic Slicer Based on Filters

Hi @SBuri,

Don't know how.is the measure you use to identify the months selected but that measure can be placed in report filter or page filter. And filter out the slicers on the page.

So.assuming that your measure returns 1 for days.to be.consider and 0 for other days.if you place that measure on report level.filters and select only 1 it will filter.out.your.slicer.dinamically.

Regards,
MFelix

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

Check out my blog: Power BI em Português


SBuri Resolver II
Resolver II

Re: Dynamic Slicer Based on Filters

Thanks for your help Felix!

 

I couldn't get that solution to work however it helped me think of another solution. I created a table with the options available to the user. The table had 2 columns, one column for the title I wanted the user to see as they selected an option, the second column for the variable I wanted to pass into my equations. Then I went to my equation and referenced the value column of the aforementioned table and said to add that value to my equation.

 

Thanks again!

View solution in original post

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors