Dynamically Enable and Disable Slicers in Power BI

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ม.ค. 2025

ความคิดเห็น • 107

  • @chandoo_
    @chandoo_ 3 หลายเดือนก่อน +1

    Awesome idea Bas... The other day someone asked me how to disable a slicer and I told them it is not possible with UI alone. But I am going to point them to this video now :)

  • @SQLDevDBA
    @SQLDevDBA 8 หลายเดือนก่อน +6

    This is so hilariously simple, but so useful. I have so many workarounds I've used in the past (like bookmarks) to accomplish this, but never thought about it this way. Love the slicer header trick as well! Thanks so much Bas!

  • @ereg31415
    @ereg31415 8 หลายเดือนก่อน +3

    Really great idea to disable the slicer! You can also change color via rules, then you don't need to create a measure and find the specific hex code

    • @HowtoPowerBI
      @HowtoPowerBI  8 หลายเดือนก่อน +1

      thx!

    • @alexgry4763
      @alexgry4763 8 หลายเดือนก่อน +6

      @@HowtoPowerBI Still sad that Microsoft makes us abuse the tool instead of introducing a conditional visibility.

  • @rafaybahelmi
    @rafaybahelmi 8 หลายเดือนก่อน +2

    Hi Bas / @HowtoPowerBI
    Thanks for the detailed video. I have implemented similar solutions in the past. However, with my solution, the slicers conflicted and returned incorrect results when the Period slicer is disabled and the date range slicer is selected (for example, the last 3 months from January to March). After this, when L12M is selected, it retains filters from both the Date Range slicer and the Period slicer, showing only the last 3 months.
    How does the behavior in your implementation differ? Could you please clarify?
    Thanks a lot for this and all other videos.
    Much appreciated.

  • @marekbona4987
    @marekbona4987 8 หลายเดือนก่อน +2

    Hello sir, thank you for this video and idea ! Works perfect with these two types of slicers, but i m working on project right now where i use dropdown slicers and it actaully makes a difference, but im still able to "open" dropdown slicer but i see nothing there using your method, which works fine but is it somehow possible to disable dropdown slicer the same way how you did that with date slicer ?
    My last question is, is this possible with buttons aswell ? tu use measures to disable and enable buttons in powerBI ?
    Thanks for your contet and have nice day !

  • @MrPloinky
    @MrPloinky 5 หลายเดือนก่อน +3

    Hi Bas, good one again. Many thanks - I succesfully implemented it into my reports. One isue is that when a selection is made in the second slicer when active, the selection in the second slicer remains in place when moving to a disabling category in slicer 1. I have tried to find a way out of that but so far unsuccesfull. Any sugestion for solutions for this from your end?

    • @PavanCh-q2u
      @PavanCh-q2u 3 หลายเดือนก่อน

      Yes, similar issue happened for me as well...when 2nd Date Range is enabled and is date is selected and after that return to slicer 1 and selects any value...2nd slicer selection remains....any solution/ideas will be much appreciated. Thank you.

  • @kingslayer1156
    @kingslayer1156 8 หลายเดือนก่อน +4

    Great video. Do you have a video on how to create L12M, 6M period measures. A link would be much appreciated

    • @alexgry4763
      @alexgry4763 8 หลายเดือนก่อน +5

      Measure =
      VAR SelectedMode = SELECTEDVALUE( Period )
      VAR MonthLag = SWITCH( TRUE(),
      SelectedMode = "Last 3 Month" , -3,
      SelectedMode = "Last 6 Month" , -6,
      SelectedMode = "Last 12 Month" , -12,
      0)
      RETURN CALCULATE( [Some Measure], DATESBETWEEN('Date'[Date], TODAY() + MonthLag*30, TODAY()) )

  • @AbhinavPhukan-gd1di
    @AbhinavPhukan-gd1di 8 หลายเดือนก่อน +1

    Thanks mate. There is some issue with slicer of style 'Between'. We cannot disable and enable based on selected values of another slicer.

  • @excel-solutions4564
    @excel-solutions4564 8 หลายเดือนก่อน +1

    Great video!
    Just one thing, if we have a selection in promotion slicer and than we select cataloge store, it will not deselect the selection in promotion slicer, right? How to handle it?

  • @MrSparkefrostie
    @MrSparkefrostie 8 หลายเดือนก่อน +1

    We are using this and have a Custom option in the date period selector, this will make things a lot neater. The one thing we have not gotten right is resetting the date slider when flipping between date periods.nneed to hit the eraser and then the period, given the text bit I think it will still affect this, likely this will help others who use this, unless this works without that

  • @jabiermartines
    @jabiermartines 8 หลายเดือนก่อน

    Thank you. Very useful.
    I am a beginner and although I have already created several reports I have always wondered how exactly to do this
    Very well explained
    Cheers from Barcelona

  • @pscorrales76
    @pscorrales76 4 หลายเดือนก่อน

    Great... Thank you for sharing this content. Question here, what if I want to enable/disable a button or image after a slicer is selected any option?

  • @janiszeh
    @janiszeh 4 หลายเดือนก่อน

    Thank, this is really nice. But is there a way to also automatically apply deselection on the slicer which is being disabled ? In this solution, the selection which was made in the first slicer, still remains active, even after that slicer was disabled, by making a selection in the second one. This can result in the wrong number being shown (for example 6M period will be partially filtered by other selection in the disabled date slicer, which would not be expected by the user)?

  • @anupamjha827
    @anupamjha827 8 หลายเดือนก่อน

    Can we use selected value for disabling time range

  • @PaulEBrownbill
    @PaulEBrownbill 8 หลายเดือนก่อน

    Thanks for this video. Your explanation makes it seem so simple, and will be very useful. Paul

  • @usman_oz
    @usman_oz 8 หลายเดือนก่อน +1

    Nice techniques for UX. However, dont you think if we have multiple slicers with such functionality & also several visuals with similar UX techniques which invlove creation of custom measure/columns / buttons / bookmarks / interactions, etc would make the report more complex to manage when someone would want to make changes to report after few months or if report is handed over to a different developer to enhance or maintain ? Thanks

    • @HowtoPowerBI
      @HowtoPowerBI  8 หลายเดือนก่อน +1

      Sure, you can also go for a mediocre report that everyone understands how to build all features .. depends what is more important to you

  • @poojadattachoudhury
    @poojadattachoudhury 8 หลายเดือนก่อน

    great video i have implemented same kind of logic in my recent development ..
    but changing the colour and text of visual is the cherry on cake ..
    will be implementing the same as well.. thank you

  • @johnbaisley2799
    @johnbaisley2799 8 หลายเดือนก่อน +1

    I tried this method and it works great on the desktop but when I publish to the service the date slicer still allows the user to click on the date to select a date, it just doesn’t actually filter anything. Was very confusing for the users

  • @nicolajpetersen4673
    @nicolajpetersen4673 8 หลายเดือนก่อน

    Can it be true there is no file to download? i cant find it on the page after clicking on the link. I did try type in my information. I couldnt sign in either, it said "registration has been disabled"

  • @AnishShrestha-u3o
    @AnishShrestha-u3o 4 หลายเดือนก่อน

    How do I reset the date slicer before disabling?

  • @stefankleinhans4895
    @stefankleinhans4895 6 หลายเดือนก่อน

    Can you do this with the same date table. I need to show or hide date (Relative) and date (Between) and clear selection after toggle.

  • @juanignacioXI
    @juanignacioXI 5 หลายเดือนก่อน

    Hi Bas glad to watch ur awesome new videos again, just a question please. Inside your report you have a measure used as a filter that is the "Customer Period Filter", inside there you have this VAR:
    VAR _MinDate = EOMONTH( _MaxDate , _MoveMonths ) + 1
    Can you please explain me what the +1 refers to?
    Thanks in advance

  • @rahulmaurya9444
    @rahulmaurya9444 8 หลายเดือนก่อน +1

    For date slicer I am using bookmark to show one slicer at a time. But this looks interesting.

    • @alexgry4763
      @alexgry4763 8 หลายเดือนก่อน

      That is one way to go. However, bookmarks scale multiplicative. Let's assume that you have 4 bookmarks. If you add some another factor, which needs 2 more Bookmarks for different states (like 2 different chart types or showing/hiding side panel for ex), you will end up creating 2x4 = 8 bookmarks. And that gets increasingly out of control very fast.

  • @jainilvora7167
    @jainilvora7167 8 หลายเดือนก่อน

    Is there any way to disable 3rd value selection in a same slicer because i want to restrict user to select only two state at a time if user try to select third value from same slicer slicer gets disable

  • @roverre61
    @roverre61 8 หลายเดือนก่อน

    Bravoooooo Bas...!!! Always great ideas and inspiration.
    Many thanks ❤

    • @HowtoPowerBI
      @HowtoPowerBI  8 หลายเดือนก่อน +1

      Thank you! Cheers!

  • @henriquemerolafaria2569
    @henriquemerolafaria2569 8 หลายเดือนก่อน +1

    Simple and powerfull. Amazing, I'm using right now !!!

  • @AlphaPrime808
    @AlphaPrime808 8 หลายเดือนก่อน

    Hi, thank you very much for the solution......now a question, as you left your date filter with those bars at the bottom, mine only shows those circles haha.......I'm referring to the date range dates.

    • @yuliiakamkova7022
      @yuliiakamkova7022 8 หลายเดือนก่อน

      try to turn off responsivnes of the slicer in the advance options of Format :)

  • @arturpiwowarski7775
    @arturpiwowarski7775 8 หลายเดือนก่อน

    How about single selection? :)

  • @nizar_arena
    @nizar_arena 8 หลายเดือนก่อน

    As always phenomenal, thanks bas !!

  • @mustafabiviji00711
    @mustafabiviji00711 8 หลายเดือนก่อน

    Bas, thanks for the trick!
    Is the line chart continuous or categorical?
    I can see it is a time series on X-axis which generally is plotted on a continuous line chart. But you have breaks in the line chart which is not possible in Power BI (unlike Tableau) ... This is required especially for sensor data where the sensor value is missing for certain date-time values.

  • @worldofdata
    @worldofdata 8 หลายเดือนก่อน

    simple yet very effective use case, great video :)

  • @Koikby79
    @Koikby79 8 หลายเดือนก่อน

    I can’t find this pbix file to download? Is that an error?

  • @CS-cl3ij
    @CS-cl3ij 8 หลายเดือนก่อน

    This is really smart!
    I thought it was going to solve my issue, but it's just off. I have 2 slicers that I'm experiencing this problem with but they're both referencing the same field.
    The reason is they wanted a quick date slicer to choose custom number of weeks and such but also want to be able to easily toggle custom date ranges(with the between type of slicer), so this solution doesn't work. From the comments, I may try an old school bookmark though

    • @LeonidKostin
      @LeonidKostin 8 หลายเดือนก่อน

      is there a way for you to duplicate this field but name differently? I think you can reuse the described above approach but you just need to separate the fields by creating the second one as a date table

  • @paulgeorges2267
    @paulgeorges2267 8 หลายเดือนก่อน

    Once again a very informative and clear video! 👌💪👏
    Correct me if I'm wrong but on Excel slicers it's a native feature to hide value with no data. Weird it's not native on PowerBI ?

  • @Harika2775
    @Harika2775 7 หลายเดือนก่อน

    If the slicer changes the date and back to click L6M the date is not disable how to do

  • @gettingby987
    @gettingby987 4 หลายเดือนก่อน

    Disabling the slicer does not clear the previously selected values in it. So if you were to filter on date range, and then select a period, the filtered date range values are still in effect, and therefore the selected period could falsely represent the amounts. Is there a way to make the "disabled" slicer go back to default or be cleared, when the other slicer it depends on is being filtered?

    • @gettingby987
      @gettingby987 4 หลายเดือนก่อน

      Not making it with bookmarks since that kind of defeats the purpose

  • @harshilmarwadi1958
    @harshilmarwadi1958 8 หลายเดือนก่อน

    🎉 That's exactly what i needed in my report

  • @MarcoAntonio-yj4br
    @MarcoAntonio-yj4br 8 หลายเดือนก่อน

    Amazing as always! Thank you!

  • @mariuszkrzemien6576
    @mariuszkrzemien6576 6 หลายเดือนก่อน +1

    Unfortunately it doesn't work for me, slicer with dates is still visibile, evertyhing works when slicer is for exmaple dropdown list but when I switch to slicer between it doesn't work, helpppppppppppp

  • @chalanatyjostna2229
    @chalanatyjostna2229 3 หลายเดือนก่อน

    I am doing exactly same but my slicer is not disabled. Works when my slicer is dropdown but doesnt work if both my slicers are between.. how can i troubleshoot this please

  • @DineshKumar-rf9eh
    @DineshKumar-rf9eh 8 หลายเดือนก่อน

    That’s really useful. What will happen if two or more values selected in the Period slicer? And can we make it dynamic for the promotion slicer if it does not exist for the selected Store?

    • @HowtoPowerBI
      @HowtoPowerBI  8 หลายเดือนก่อน

      you would need to set that slicer to single select only

    • @HowtoPowerBI
      @HowtoPowerBI  8 หลายเดือนก่อน

      it is dynamic

    • @MrSparkefrostie
      @MrSparkefrostie 8 หลายเดือนก่อน

      You could also add your periods and a "custom" option with forced selection, only downside here is the user needs to click the eraser on the slider when switching to a fixed period

  • @Fannie2uN2010
    @Fannie2uN2010 8 หลายเดือนก่อน

    keep going Bas, we love you

  • @fanlovexcel
    @fanlovexcel 8 หลายเดือนก่อน

    Nice trick again! Very insightful 😊

  • @borteyhumphrey
    @borteyhumphrey 7 หลายเดือนก่อน

    I have a similar setup but with a Year slicer and a Date slicer (range/between). Implemented this logic but it does not work for some reason. Would appreciate your help.

    • @HowtoPowerBI
      @HowtoPowerBI  7 หลายเดือนก่อน

      Maybe check the download file and see what you did differently

  • @abbashuzefamotiwala
    @abbashuzefamotiwala หลายเดือนก่อน

    how to exclude a visual from page level filter in power bi?

    • @HowtoPowerBI
      @HowtoPowerBI  หลายเดือนก่อน

      You can’t. You would need to work then with the visual level filters

  • @dmitrypopok
    @dmitrypopok 7 หลายเดือนก่อน

    Unfortunately, this does not seem to work with Relative Date and Relative Time type of slicers

  • @down_with_data
    @down_with_data 7 หลายเดือนก่อน

    As always amazing

  • @cmagnos
    @cmagnos 8 หลายเดือนก่อน

    Great videos, I'll implement this technique soon.

  • @QuantumIdeas
    @QuantumIdeas 8 หลายเดือนก่อน

    Truly useful. Bookmarked!

  • @TheAtulsachan1234
    @TheAtulsachan1234 8 หลายเดือนก่อน

    Disabling a slicer when you know that from calalog stores we do not sell via promotion. How about those scenarios when we are even aware if sell anything via promotion? I am looking at a dynamic hiding whenever there is no selection available on the second slicer.

    • @sanchowitfurrows1561
      @sanchowitfurrows1561 6 หลายเดือนก่อน

      try to use single column tables instead of slicers

  • @MrHaddad
    @MrHaddad 8 หลายเดือนก่อน

    Morning dear, how I can showing the group "matrics" on the right panel like I saw in your vedio?

    • @benndii
      @benndii 8 หลายเดือนก่อน +1

      Just create a new table in the modeling view with no content or one column. Rename that and done.

    • @HowtoPowerBI
      @HowtoPowerBI  8 หลายเดือนก่อน +1

      th-cam.com/video/cGnWPua-cmo/w-d-xo.html

  • @The-Developer-BI
    @The-Developer-BI 8 หลายเดือนก่อน +2

    Friendly Suggestion No thumbnail ✋ Maybe You forgot to choose ...
    Make it fix✅❤️

    • @HowtoPowerBI
      @HowtoPowerBI  8 หลายเดือนก่อน +2

      oops

    • @AyanKhan-d6f8v
      @AyanKhan-d6f8v 8 หลายเดือนก่อน +1

      Two Power BI Legend in one Frame❤😍

  • @RadAlzyoud
    @RadAlzyoud 8 หลายเดือนก่อน

    Brilliant. Thx for sharing.

  • @Howtododata
    @Howtododata 8 หลายเดือนก่อน

    Thank you sir 😊

  • @ashishmohan4707
    @ashishmohan4707 8 หลายเดือนก่อน

    Amazing great New learning in Power BI

    • @HowtoPowerBI
      @HowtoPowerBI  8 หลายเดือนก่อน

      Glad you think so!

  • @Wh1sperw1nd
    @Wh1sperw1nd 3 หลายเดือนก่อน

    Looks great, but doesn't work perfectly for me: Once values have been selected in a slicer, they stay visible even when the slicer gets disabled like shown in the video. Anyone else get that problem and/or has a solution?

  • @nkosinathindlovu3059
    @nkosinathindlovu3059 2 หลายเดือนก่อน

    My Power BI does not allow me to select a measure when I do conditional formatting at "Dynamic slicer text" and "Conditional formatting of slicer header" ☹
    Edit: Okay it works when I edit the Measures in the Semantic Model😃 and apply the formatting in the Report. I have a live connection to Power BI Service

  • @IvanKashperuk
    @IvanKashperuk 8 หลายเดือนก่อน

    What about hiding it instead of disabling?

    • @LucaGanugi
      @LucaGanugi 8 หลายเดือนก่อน +3

      A very basic feature that's still missing unfortunately

    • @HowtoPowerBI
      @HowtoPowerBI  8 หลายเดือนก่อน +1

      that would be nice

    • @mcnater
      @mcnater 8 หลายเดือนก่อน

      Something Qlikview had 13 years ago that PBI for some reason can’t do.

    • @eriochrome_bt
      @eriochrome_bt 8 หลายเดือนก่อน

      Agreed.. Hiding or changing layer value to bring forward or back. But this is good progress in capabilities.

  • @edwinarchico439
    @edwinarchico439 8 หลายเดือนก่อน

    Awesome, got to use this in my dashboard

    • @HowtoPowerBI
      @HowtoPowerBI  8 หลายเดือนก่อน

      💻🤓😁 hope you got it up and running

  • @leonelalegria7787
    @leonelalegria7787 8 หลายเดือนก่อน

    TOP! Thanks!

    • @HowtoPowerBI
      @HowtoPowerBI  8 หลายเดือนก่อน

      THANKS! 😁

  • @iiiiii-w8h
    @iiiiii-w8h 8 หลายเดือนก่อน +3

    It's ridiculous the number of "hacks" you need to do in order for power bi to work properly

  • @azwarmzafar
    @azwarmzafar 8 หลายเดือนก่อน

    Great tips many thanks

  • @8g8819
    @8g8819 8 หลายเดือนก่อน

    You are a beast!

  • @ankurgupta4325
    @ankurgupta4325 7 หลายเดือนก่อน

    You are awesome

  • @Art_Van_Delay
    @Art_Van_Delay 8 หลายเดือนก่อน

    I really appreciate your videos. Could I make 1 small suggestion though? Could you please put the entire Power BI application in your background and make the video of yourself a little smaller in the corner? I don't know if it's just me but it's so hard to follow which window you're in or which part of Power BI Desktop you're in when all we see is the little window of the part you're working on. We appreciate seeing your face but maybe it'd be okay if it's a little smaller in the corner so we could see more of what's happening. Most of the time, I end up just going to another channel because I don't understand where you are in the application. Thanks again.

    • @HowtoPowerBI
      @HowtoPowerBI  8 หลายเดือนก่อน

      thanks for the feedback. I prefer the editing style as is, so probably wont change any time soon

  • @nevermore17011990
    @nevermore17011990 8 หลายเดือนก่อน

    beyond godlike

  • @AhmedCherif-mt5lb
    @AhmedCherif-mt5lb 8 หลายเดือนก่อน

    Thank's 👏☺️

    • @HowtoPowerBI
      @HowtoPowerBI  8 หลายเดือนก่อน

      You're welcome 😊

  • @avishekghosh8134
    @avishekghosh8134 5 หลายเดือนก่อน

    This solution was available all along. The problem with this solution is that if any of the options from the slicer to be hidden is either pre-selected or selected during the usage that option will continue to show even when it is not supposed to show. It only works as long as no option is selected from the slicer to be hidden. The moment one option gets selected, the functionality is gone for a toss. Not a realistic solution.

  • @niltonsantos479
    @niltonsantos479 8 หลายเดือนก่อน

    Perfect

  • @MagdyTawfikA
    @MagdyTawfikA 8 หลายเดือนก่อน

    Great illustration,
    one lingering question: can we filter some of a slicer items (not the whole slicer) based on selection of another slicer?
    By the way, I found the answer to my question at one of your videos:
    SMARTER Slicers = BETTER User Experience | Show Only What's Relevant in Your Slicers in Power BI
    th-cam.com/video/ieySnvM6hVk/w-d-xo.html
    Thank you so much!!

  • @philipedesouzasantos1201
    @philipedesouzasantos1201 4 หลายเดือนก่อน

    This won't work at all unfortunately, once you have selected the date you can't go back to fiscal year without cleaning all the filters. It's very complicated for the final user.

  • @mariamolchanova3831
    @mariamolchanova3831 8 หลายเดือนก่อน +1

    why do you always look like you would benefit from more sleep? please address your health, we do rely on you and would like to see you around.

    • @sum_andres31
      @sum_andres31 8 หลายเดือนก่อน

      That's a really distasteful comment to make

    • @theoldvocals266
      @theoldvocals266 8 หลายเดือนก่อน

      Absolute rubbish comment to make.