Forum Discussion

mehul26's avatar
mehul26
Helper I
4 years ago

Dynamic Default value on slicer based on selected value

 

I have two slicers, Year and Quarter.  The Year slicer has 'Current Year' and 'Last Year'.  The quarter slicer has Year_Quarter.  I want the quarter slicer to dynamically change based on the year selected.  If Current Year is selected, then selected 'Current Quarter'.  If Last Year is selected, then select, Previous quarter.  NOTE:  Two slicers are not related and should not be.

 

Here are the assumptions:

  1. Current Year/Last Year slicer is not linked to Quarter slicer (This is by design)
  2. Current Year/Last Year slicer only changes Data 1, Data 2 and Data 3.  It has no impact on Data 4  (This is by design)
  3. Quarter Slicer only changes Data 4 and has no impact to Data 1,2 or 3 (This is by design)

 

 

 

6 Replies

  • mhossain's avatar
    mhossain
    Solution Sage

    mehul26 

     

    Your screenshot for Quarters is having force Single select option, so once you select anything it can change autoatically the other options, selection click will not get changed automatically.

    However the requirement you mentioned above is possible, you can make changes to Quarter slicer so that it's not force selected. And then link year and Quarter slicers to each other and then edit interaction on visuals as you have mentioned above, if quarter should not impact Data1 then edit the interaction between these.

    Hope above is making sense.

    • mehul26's avatar
      mehul26
      Helper I

      mhossain 

      I went ahead and changed the Quarter filer so its no longer a single selected.  Do you happen to have a DAX example to the 2nd part?

      • mhossain's avatar
        mhossain
        Solution Sage

        mehul26 

        1). You can edit the interaction so that there are no interaction between Quarter slicer and Data1,2,3, same for Current Year/last year slicer.   Edit interaction option you will get under 'Format' tab in toolbar pbi desktop.

         

        OR

        2). In the measures add "ALL" dax   e.g  Calculate (measure name/calculation, All(columnName)) This will ignore the selected column in slicer.

         

        Hope above is making sense.

        If possible you can share dummy pbix also.