Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Sathvik123
Helper V
Helper V

Hiding one slicer based on other

Hello All,

 

I have a report where  I am having 3 slicers TrendType , DailyQueueName and WeeklyQueueName.

 

If the user selects Daily in the TrendType I need to show only DailyQueueName  slicer and hide WeeklyQueueName

If the user selects Weekly in the TrendType I need to show only WeeklyQueueName  slicer and hide DailyQueueName.

 

 

 

Could any one please help how to do this

1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

Hi @Sathvik123

Just an idea: rather than hiding the slicers, you could use a field parameter to switch the slicer between DailyQueueName and WeeklyQueueName.

 

I have attached a dummy PBIX showing how it could work.

 

  1. Create a field parameter is created containing columns DailyQueueName and WeeklyQueueName.
  2. Add a calculated column TrendType to the field parameter table containing corresponding values of "Daily" and "Weekly"
  3. ​Add a slicer for TrendType
  4. Add a slicer for the field parameter column QueueName[QueueName], and select "Show values of selected field" in the right-click menu of the QueueName field on the slicer

    The second slicer will then switch based on the first slicer's selection.

     

     

    Does this work for you, or would you rather have Daily/Weekly slicers both present but "hide" the inactive one somehow?

     

    OwenAuger_0-1687518779653.png

Regards

 


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

View solution in original post

4 REPLIES 4
OwenAuger
Super User
Super User

Hi @Sathvik123

Just an idea: rather than hiding the slicers, you could use a field parameter to switch the slicer between DailyQueueName and WeeklyQueueName.

 

I have attached a dummy PBIX showing how it could work.

 

  1. Create a field parameter is created containing columns DailyQueueName and WeeklyQueueName.
  2. Add a calculated column TrendType to the field parameter table containing corresponding values of "Daily" and "Weekly"
  3. ​Add a slicer for TrendType
  4. Add a slicer for the field parameter column QueueName[QueueName], and select "Show values of selected field" in the right-click menu of the QueueName field on the slicer

    The second slicer will then switch based on the first slicer's selection.

     

     

    Does this work for you, or would you rather have Daily/Weekly slicers both present but "hide" the inactive one somehow?

     

    OwenAuger_0-1687518779653.png

Regards

 


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

Hello,

Thanks for sharing your solution, I've tried to understand and make it work but I'm not able too...

How did you manage to load the content of the table in the new created table? I don't have the same icone as you:

SamDecideom_0-1694711093145.png

 

https://www.transfernow.net/dl/20230914kF5toj72

Hi @SamDecideom 

You need to create the DateName table as a field parameter, rather than a regular calculated table.

 

This is most easily done by following the instructions here:

https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-field-parameters

 

If you want to change an existing table to a field parameter table, you can follow the instructions here using Tabular Editor:

https://p3adaptive.com/2022/05/completing-the-set-up-field-parameters-using-tabular-editor/

 

Regards

Owen

 

P.S. If this is my last post, all the best to everyone!


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

Amazing @OwenAuger 
Thank you for your time and your help!!

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.