Forum Discussion

unnijoy's avatar
unnijoy
Post Prodigy
6 years ago
Solved

Visuals based on filter

I have attriton data based on country. I have visuals whcih shows attrition %. I have a dropdown filter based on country.

 

1) Now i need all the visuals to be blank if multiple countries are selected. Visuals should show the numbers if only one country is         selected.

2) We can see that if data is not available the visuals will show (Blank). Can we make it "-" or any mesage like "Data not available".

  • Anonymous's avatar
    Anonymous
    6 years ago

    unnijoy ,

     

    For the entire visual to be blank.

    You can use the following measure.

     

    Category1 =
    var __selval = HASONEVALUE('TABLE'[Country])

    return
    //__selval
    //IF(__selval,1,0)
    IF (__selval,
    SWITCH(
    TRUE(),
    [Attr%S] < [25PercentileNew] , "Top Quartile",
    ([Attr%S] >= [25PercentileNew]) && ([Attr%S] < [50PercentileNew]) , "25th to 50th Quartile",
    ([Attr%S] >= [50PercentileNew]) && ([Attr%S] < [75PercentileNew]) , "50th to 75th Quartile",
    "Bottom Quartile"
    )
    ,
    BLANK()
    )
     
     
     
     
     
    Regards,
    Harsh Nathani
     
    Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!!
     
     

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi unnijoy ,

     

    1. I think you can change your slicer to single-selection only mode to solve the problem:

     

    2. Assuming you have a measure to calculate the attrition % called "attrition %" in your report.

    You can try to add a new measure like:

    if(isblank(attrition %),"-",attrition %)

     

    Please try.

    Aiolos Zhao

    • Anonymous's avatar
      Anonymous
      Not applicable

      unnijoy ,

       

      For the entire visual to be blank.

      You can use the following measure.

       

      Category1 =
      var __selval = HASONEVALUE('TABLE'[Country])

      return
      //__selval
      //IF(__selval,1,0)
      IF (__selval,
      SWITCH(
      TRUE(),
      [Attr%S] < [25PercentileNew] , "Top Quartile",
      ([Attr%S] >= [25PercentileNew]) && ([Attr%S] < [50PercentileNew]) , "25th to 50th Quartile",
      ([Attr%S] >= [50PercentileNew]) && ([Attr%S] < [75PercentileNew]) , "50th to 75th Quartile",
      "Bottom Quartile"
      )
      ,
      BLANK()
      )
       
       
       
       
       
      Regards,
      Harsh Nathani
       
      Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!!
       
       
  • Try a measure like this

    new Measure=

    if(isfiltered(country[country]) && countx(allselected(country),country[country])=1,[measure],blank())