Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Filter bar chart

How I can filter this bar chart to only keep projects (bars) that have late deliveries, i.e. only show projects A and B in this example? Sample data table is below


Sample data table:

delivery idProject nameDelivery time
1Project AOn time
2Project BOn time
3Project AOn time
4Project COn time
5Project COn time
6Project AOn time
7Project BOn time
8Project COn time
9Project DOn time
10Project DOn time
11Project AOn time
12Project BOn time
13Project DOn time
14Project EOn time
15Project ALate
16Project BLate
17Project ALate

 

  • Irwan's avatar
    Irwan
    2 years ago

    hello Anonymous 

     

    please check if this what you need.

     

    If this what you need, then you can create new measure with conditional if or switch.

    Measure =
    var _Late = CALCULATE(COUNT('Table'[Delivery time]),'Table'[Delivery time]="Late")
    Return
    IF(
        _Late>0,
        COUNT('Table'[Delivery time])
    )
     
    then change the x-axis value into the measure that has been made above.

     

    Hope this will help you.

    Thank you.

7 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      I cant share the file. It's proprietory data. See sample data file above. Thanks!

  • manvishah17's avatar
    manvishah17
    Solution Supplier

    Hi Anonymous ,
    You can just simple add visual level filter on Bar graph ,
    where ,
    delivery time= late 

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      manvishah17, thank you for your suggestion, but I do want to show the On time deliveries for these projects. So, your solution is not what I am looking for. I am looking to only display Projects that have late deliveries but I want to display ALL of their deliveries, not only late. Thanks!

      • Irwan's avatar
        Irwan
        Super User

        hello Anonymous 

         

        please check if this what you need.

         

        If this what you need, then you can create new measure with conditional if or switch.

        Measure =
        var _Late = CALCULATE(COUNT('Table'[Delivery time]),'Table'[Delivery time]="Late")
        Return
        IF(
            _Late>0,
            COUNT('Table'[Delivery time])
        )
         
        then change the x-axis value into the measure that has been made above.

         

        Hope this will help you.

        Thank you.