Forum Discussion

wonka1234's avatar
wonka1234
Helper III
1 year ago
Solved

Slicer - Include Blanks automatically

  Hi   1) Is there a better way I do can this slicer? I dont want to click Blank every time! I want it to be one or the other (Draft or Final). and I dont want to include duplicate values.  I am e...
  • v-sgandrathi's avatar
    v-sgandrathi
    1 year ago

    Hi wonka1234,

     

    To allow users to switch between “Draft” or “Final” and always include blank values, you can follow this method.
    First, create a new table in Power BI which is not connected to your main data model. This table should just have two rows: one with “Draft” and one with “Final”.

    You can create it using a DAX formula like DATATABLE("Status", STRING, { {"Draft"}, {"Final"} }).

    Now, use this new table in a slicer so that the user can choose either “Draft” or “Final”.

    Since it’s not connected to your main data directly, you need a measure to apply this selection to your visuals.

    Write a DAX measure that checks if the selected value matches the “Draft_or_Final” column in your data, or if that column is blank.

    If either condition is true, it will return TRUE. Then, apply this measure as a visual-level filter (set to TRUE) for your charts.

    This way, only matching rows and blank rows are shown. The user doesn't have to manually select blanks, and you avoid showing duplicate values or unwanted blank options in the slicer.

    Even though you have many visuals, this setup will help you maintain clean filtering across the report without too much repetition.

     

    Happy to help! If this addressed your concern, marking it as "Accepted Solution" and giving us "kudos" would be valuable for others in the community.

    Thank you.