Forum Discussion

ThomasDay's avatar
ThomasDay
Impactful Individual
10 years ago
Solved

visual filter for Clustered Column Chart

Hello Fellow PowerBi'ers,

 

I have a Custered Column Chart whose function is pretty straightforward---show three bars  Each is a computed measure from a single table that is filtered via a relationship.  The filter picks a "Performance Measure" and the three bars are percentile calc's.  Here's a picture:

I only want it to show if a Performance Measure has been picked....meaning

  • DistinctCount on the variable name in the relationship connected table is one--this visual filter doesn't respond to mouse clicks to enter a 1
  • OR the variable name ISFILTERED in that relationship connected table--a visual filter from this doesn't respond to mouse clicks to enter a filter condition
  • OR the variable name DistinctCount in the data table generating the values is 1--this allows me to say is 1, but doesn't respond (not show) to a situation where it's not one. (VariableCount = DistinctCount(MeasuresData[Variable_Name]))

Any ideas here?

Thanks, Tom

 

  • ThomasDay

     

    Based on my understanding, what you'd like is

    1. Don't show any bar in the char when no option or more than one option selected.
    2. Show 3 bars according to the selected one option.

    If your case is as above, try to modify your measures like

     

    25th =
    IF (
        ISFILTERED ( Table[VariableColumn] ) && HASONEVALUE ( Table[VariableColumn] ),
        PERCENTILE.INC ( MeasuresData[Variable_Value], .25 ),
        0
    )

    If it solves your problem, please accept it as solution. For any question, feel free to let me know. :)

     

5 Replies

  • Eric_Zhang's avatar
    Eric_Zhang
    Microsoft Employee

    ThomasDay

     

    Your requirement is confusing me. Please post the measure expressions and the tables details.

    • ThomasDay's avatar
      ThomasDay
      Impactful Individual

      Hello Eric_Zhang,  Thank you for your reply and sorry for the delay.  Here are details.  
      The column chart and the fields it displays are shown below: 

       

      Each of the three bar values is a measure computed like the following...one for 25th, 50th, and 75th percentiles

       

      25th = PERCENTILE.INC(MeasuresData[Variable_Value],.25)

       The MeasuresData table is filtered like so--picking a variable name--and all the records associated with that variable name are used to compute the percentiles.

       

      And then to recap the question: how can I show the percentile bars ONLY when there has been a Variable Name (Numerator Measure in the filter heading above) chosen?

       

      Take a peek at the first post to see what I've tried.

      Does this help?

      Thanks for any help in advance,

      Tom

       

      • Eric_Zhang's avatar
        Eric_Zhang
        Microsoft Employee

        ThomasDay

         

        Based on my understanding, what you'd like is

        1. Don't show any bar in the char when no option or more than one option selected.
        2. Show 3 bars according to the selected one option.

        If your case is as above, try to modify your measures like

         

        25th =
        IF (
            ISFILTERED ( Table[VariableColumn] ) && HASONEVALUE ( Table[VariableColumn] ),
            PERCENTILE.INC ( MeasuresData[Variable_Value], .25 ),
            0
        )

        If it solves your problem, please accept it as solution. For any question, feel free to let me know. :)

         

  • Vi200838's avatar
    Vi200838
    Regular Visitor

    Eric_Zhang : I have a similar required . I have some product groups and a measure. I am showing both on a chart. The requirement is when All is selected it should show a single bar in the clustered chart with the total of the measure for all the groups and when specific groups are selected it should show the bars for the groups selected.