Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Dynamic Title based on multiple slicer values to return "No Filters Applied" when no values selected

I have multiple measures for SELECTEDVALUE to show what filters are being applied in a pop-out slicer (pop out slicer has 10 filters).  My SELECTEDVALUE measures are combined, and I use a / separator between them.  Ex:  State:  Texas / City:  Houston /…. The problem is that when no filters are selected it shows /////////.  How do I replace that with “No filters applied” when nothing has been filtered in the Slicer Panel?

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Anonymous ,

    I have created a simple sample, please refer to my pbix file to see if it helps you.

    Create a measure based on the measures.

    Measure_result =
    IF (
        NOT ( ISBLANK ( [Measure] ) && ISBLANK ( [Measure 2] ) ),
        COMBINEVALUES ( "/", [Measure], [Measure 2] ),
        "No Filters Applied"
    )
    

    If I have misunderstood your meaning, please provide your desired output with more details and your pbix file without privacy information.

     

    Best Regards

    Community Support Team _ Polly

     

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

     

     

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    In your dax function make  a if statment that contains if  all of your selectedvalue are empty then it will show the text No filted Applied else it will show the slicers that the user has selected.

    IF( isblank(Selectedvalue(tabname1[clumn_name1]) && isblank(Selectedvalue(tabname2[clumn_name2]).....,"No filters applied,YOUR_COMBINED_TEXT)

    I made a measure in my project just for 1 slicer 

    here is my measure:

    SLICER CHECK = if(ISBLANK(SELECTEDVALUE(DIM_ARTICLE[Code_Article])),"No filter Applied", SELECTEDVALUE(DIM_ARTICLE[Code_Article]))
    here is the result:

     

     

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    I tried something similar to this but it is still showing the ////////.  I am using:  = SELECTEDVALUE(Table[TableColumn]) for each of my filters and then combining them with = COMBINEVALUES(" / "), [Measure1], [Measure2], etc.. and then using your forumla suggested above.  I have made sure my filters are clear and it is still just showing //////.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    I have created a simple sample, please refer to my pbix file to see if it helps you.

    Create a measure based on the measures.

    Measure_result =
    IF (
        NOT ( ISBLANK ( [Measure] ) && ISBLANK ( [Measure 2] ) ),
        COMBINEVALUES ( "/", [Measure], [Measure 2] ),
        "No Filters Applied"
    )
    

    If I have misunderstood your meaning, please provide your desired output with more details and your pbix file without privacy information.

     

    Best Regards

    Community Support Team _ Polly

     

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

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      This worked!  Thank you!!

  • Hi!

    If your slicers are single select then SELECTEDVALUE is ok. 
    For avoiding the /// appearing when no selection have been made you can use this:
    VAR _a =
    IF(
          SELECTEDVALUE(TableA[Column1])<>BLANK(),
          SELECTEDVALUE(TableA[Column1])&"/",BLANK()
    )
    VAR _b = 
    IF(
          SELECTEDVALUE(TableB[Column1])<>BLANK() && _a<>BLANK(),
          "/"&SELECTEDVALUE(TableB[Column1]),
          IF(SELECTEDVALUE(TableB[Column1])<>BLANK() && ISBLANK(_a),
          SELECTEDVALUE(TableB[Column1]),
          BLANK()
    )
    )
    .

    .

    .

    VAR Title = IF (ISBLANK(_a) && ISBLANK(_b) &&..... , "No Filters Applied", _a&_b&....)

    RETURN

    Title