Forum Discussion

paulo_mendonca's avatar
paulo_mendonca
New Member
4 months ago
Solved

Slicer Unselected Functionality

It would be helpful if the slicer could pass-through NO data when nothing is selected so that downstream visuals don't return errors or consume resources trying to ingest all the data.

Currently the slicer treats the "all selected" and the "none selected" states as identical, returning the full data. This is needed and desirable in many situations.

The slicer could have an option where the behavior of the "none selected" state could be set to "same as all selected" or could be set to "no data selected". This would allow the report designer to match the behavior to the need. For example, if the full data breaks the limits of a downstream graph, leaving the slicer unselected would leave the graph empty instead of displaying an error. Then, once at least one selection is made in the slicer, the selected data would be passed as normal.

There are some situations where this can be accomplished with measures, but they are clunky and not always possible.

  •  

    Hi paulo_mendonca 

    In addition to the idea already suggested here as a product improvement, you may also be able to simulate this behavior yourself with a modeling workaround.

    One option is to create a disconnected helper table for the slicer that contains:

    all values from the original slicer dimension
    an extra row such as "Nothing selected"

    Then your measures can rely on that helper table instead of the native slicer state alone. When "Nothing selected" is chosen, the measure returns BLANK(), so downstream visuals stay empty instead of trying to render the full dataset.

    For example:

    Slicer_Helper =
    UNION(
    ROW("Category", "Nothing selected"),
    SELECTCOLUMNS(
    DISTINCT(DimProduct[Category]),
    "Category", DimProduct[Category]
    )
    )

    And then:

    Sales Controlled =
    VAR SelectedCategory =
    SELECTEDVALUE(Slicer_Helper[Category], "Nothing selected")
    RETURN
    IF(
    SelectedCategory = "Nothing selected",
    BLANK(),
    CALCULATE(
    [Sales Amount],
    TREATAS({SelectedCategory}, DimProduct[Category])
    )
    )

    This is of course more manual, and it pushes the logic into the measures, but it can be a practical workaround when the default slicer behavior causes performance issues or visual-limit errors.

    Also, it may be worth checking AppSource / the marketplace for alternative slicer visuals, because custom slicers do exist there, such as Chiclet Slicer, and some may offer interaction patterns or configuration options that better fit this use case than the built-in slicer

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

  • Hi paulo_mendonca

    I have come across such situations multiple times and my go to method is using DAX to capture filter values using

    "Iscrossfiltered". Below is the example code
     
    Checkfilter = ISCROSSFILTERED ( 'FactSales' ) 

    Using the above we can create our DAX measures

     Total Sales = IF ( 
    checkfilter = False(), 
    "Please apply at least one filter", 
    FORMAT ( [Total Sales], "£#,##0" ) 
    )

    This would ideally give you clean page until an unless a filter that is related to FactSales table is not applied. 

    If my answer helped you solve the problem, please consider accepting it as the solution and help other members to use the same solution in same/similar situations. 

     

    Thanks,
    Garvit Gupta
    Linkedin: https://www.linkedin.com/in/garvit-gupta/

     

     

5 Replies

  •  

    Hi paulo_mendonca 

    In addition to the idea already suggested here as a product improvement, you may also be able to simulate this behavior yourself with a modeling workaround.

    One option is to create a disconnected helper table for the slicer that contains:

    all values from the original slicer dimension
    an extra row such as "Nothing selected"

    Then your measures can rely on that helper table instead of the native slicer state alone. When "Nothing selected" is chosen, the measure returns BLANK(), so downstream visuals stay empty instead of trying to render the full dataset.

    For example:

    Slicer_Helper =
    UNION(
    ROW("Category", "Nothing selected"),
    SELECTCOLUMNS(
    DISTINCT(DimProduct[Category]),
    "Category", DimProduct[Category]
    )
    )

    And then:

    Sales Controlled =
    VAR SelectedCategory =
    SELECTEDVALUE(Slicer_Helper[Category], "Nothing selected")
    RETURN
    IF(
    SelectedCategory = "Nothing selected",
    BLANK(),
    CALCULATE(
    [Sales Amount],
    TREATAS({SelectedCategory}, DimProduct[Category])
    )
    )

    This is of course more manual, and it pushes the logic into the measures, but it can be a practical workaround when the default slicer behavior causes performance issues or visual-limit errors.

    Also, it may be worth checking AppSource / the marketplace for alternative slicer visuals, because custom slicers do exist there, such as Chiclet Slicer, and some may offer interaction patterns or configuration options that better fit this use case than the built-in slicer

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

  • Hi paulo_mendonca

    I have come across such situations multiple times and my go to method is using DAX to capture filter values using

    "Iscrossfiltered". Below is the example code
     
    Checkfilter = ISCROSSFILTERED ( 'FactSales' ) 

    Using the above we can create our DAX measures

     Total Sales = IF ( 
    checkfilter = False(), 
    "Please apply at least one filter", 
    FORMAT ( [Total Sales], "£#,##0" ) 
    )

    This would ideally give you clean page until an unless a filter that is related to FactSales table is not applied. 

    If my answer helped you solve the problem, please consider accepting it as the solution and help other members to use the same solution in same/similar situations. 

     

    Thanks,
    Garvit Gupta
    Linkedin: https://www.linkedin.com/in/garvit-gupta/

     

     

  • v-ssriganesh's avatar
    v-ssriganesh
    Community Support

    Hi paulo_mendonca,

    Thank you for posting your query in the Microsoft Fabric Community Forum, and thanks to garvitgupta96Ritaf1983 & Gabry for sharing valuable insights.

     

    Could you please confirm if your query has been resolved by the provided solutions? This would be helpful for other members who may encounter similar issues.

     

    Thank you for being part of the Microsoft Fabric Community.

  • v-ssriganesh's avatar
    v-ssriganesh
    Community Support

    Hello paulo_mendonca,

    We hope you're doing well. Could you please confirm whether your issue has been resolved or if you're still facing challenges? Your update will be valuable to the community and may assist others with similar concerns.

    Thank you.