Forum Discussion

NitaT's avatar
NitaT
Frequent Visitor
5 years ago
Solved

Automatically update a slicer based on day of week

Hello! I am new to Power Query and need some help with a slicer.  I have a DateDim set up using this code (thank you dkay84_PowerBI ) with a few amendments, as my week starts on a Sunday and ends on...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi NitaT ,

     

    Currently, we are not able to set default value as you describe and disable the ability for user to cancel choice in slicers. 

    Although this isn’t natively supported as of yet, we can imitate this functionality with a little bit of DAX! A general overview of the process to accomplish this task is as follows:

    1. Create a slicer.
    2. Create a measure to determine how many selections are currently made on the slicer. We’ll call this Current Selections.
    3. Create a measure to determine the total number of possible slicer selections. We’ll call this Total Selections.
    4. Create a final measure using logic from the previous two steps. If Current Selections = Total Selections, then something, else something (We’ll fill this in later).

     

    Reference: Setting a Default Slicer Selection

     

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.