Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Blank visuals by default

Hi everyone ๐Ÿ™‚ I have a sliser with three values, one of them being (Blank). How do I make the Blank default choice so when an end-user opens the report, he sees all visuals empty until he choses either Deep or West?

I tried this measure but didn't get it work:

Blank Filter = IF(ISFILTERED(CD[name]),FIRSTNONBLANK(CD[name], CD[name])," ")
 
Thanks in advance!

8 Replies

  • Hi Anonymous ,

     

    Try a dax as follows:

    IsBlankCheck = IF(ISFILTERED(CD[name]), 1, 0)

     

    Move this to your visual on your page in visual level filter with "1" selected. So, when you select a slicer value in CD[name], the visual will display result, otherwise it will show blank visual.

     

    Thanks,

    Pragati

     
    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Pragati11 sorry i didn't get it. Should I replace 1 and 0 with the non-blank names?

      and when I move the measure to the filter on that visual, the advanced filter appears. Should I choose is 1?

       

      • v-zhenbw-msft's avatar
        v-zhenbw-msft
        Community Support

        Hi Anonymous ,

         

        We can create a new table that contains one column and a measure to meet your requirement.

         

        1. Create a table that get the distinct name column.

         

        Name_table = VALUES(CD[name])

         

         

        2. Then we create a slicer using this column and create a measure.

         

        Measure = 
        var _selected = SELECTEDVALUE(Name_table[name])
        return
        IF(_selected="",BLANK(),CALCULATE(SUM(CD[value]),FILTER(CD,CD[name]=_selected)))

         

         

        If it doesnโ€™t meet your requirement, could you please provide a mockup sample based on fake data?

        It will be helpful if you can show us the exact expected result based on the tables.

         

        Please upload your files to OneDrive For Business and share the link here. Please don't contain any Confidential Information or Real data in your reply.

         

        BTW, pbix as attached.

         

        Best regards,

         

        Community Support Team _ zhenbw

        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

      Hi Pragati11 I applied the filter (Show items when the valus is 1). But it is still shows all three slicers. 

      • Pragati11's avatar
        Pragati11
        Super User

        Hi Anonymous ,

         

        Is it possible to share your pbix file? You can share it as a private message if you can't share the .pbix file here.

         

        Thanks,

        Pragati