Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Default slicer - based on some condition

Hello Team,

 

I am working on a requirement to have slicer (filter) in the dashboard, consider the columns name as BASELINE used in my slicer. Now i wanted to show all the values in the BASELINE column in the slicer but by defalut it need to select a record from this column where max(CloseDate) where LB_Status = "Historized"

 

 

Please give me some insights 

3 Replies

  • Hey Anonymous ,

     

    at the current moment it is not possible to define a value for a slicer.

    Often this is implemented by creating a 2nd slicer containing only two values like ALL and DEFAULT.
    Then you can create a measure that helps to hide or show the values from the basic slicer.

    How to show or hide values from a slicer is described in greater detail in this article: https://www.sqlbi.com/articles/syncing-slicers-in-power-bi/

     

    Hopefully, this provides you with an idea of how to tackle your challenge.

     

    Regards,

    Tom

  • Anonymous's avatar
    Anonymous
    Not applicable

    TomMartens Thank you for your valuable insights. I will consider this case, also Could you please advice any other approch that will be applicable for this scenario. 

    • TomMartens's avatar
      TomMartens
      Icon for Super User rankSuper User

      Hey Anonymous , I can not suggest a different approach for a scenario that you describe with only two sentences
      "
      I am working on a requirement to have slicer (filter) in the dashboard, consider the columns name as BASELINE used in my slicer. Now i wanted to show all the values in the BASELINE column in the slicer but by defalut it need to select a record from this column where max(CloseDate) where LB_Status = "Historized"
      "
      As I already mentioned in my previous reply - there is no default value to slicers. Take the time to provide a pbix that contains sample data but still reflects your data model (tables, relationships, calculated columns, and measures). Upload the pbix and the sample (text or xlsx) to onedrive, google drive, or dropbox and share the link. Make sure that downloading your content does not require any login (at least I will loose my interest immediately).
      Also, take your time, to describe what you want to achieve and why. Sometimes the what and why provide more hints to provide a solution than a detailed description of a measure.

       

      Regards,

      Tom