Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
AB1
Regular Visitor

Count of tickets which are overdue and have specific values in certain columns

Hello everyone,

 

I am trying to get a card visual to show the count of tickets that have Overdue Days > 5 and are in a State of Open or Work In Progress and an Approval state of Approved, Pending CAB, or Retrospective.

 

Here is my example Table:

NumberStateApproval statePlanned End DateOverdue DaysWould be counted
CHG0049874Closed CompleteApproved07/05/2021 16:5560 
CHG0050207OpenApproved06/07/2021 20:000 
CHG0050176Work in ProgressRetrospective09/05/2021 11:00621
CHG0050156OpenPending CAB03/08/2021 10:00-28 
CHG0050095OpenPending CAB25/06/2021 14:00111
CHG0049959Closed FailedApproved09/06/2021 17:0027 
CHG0049069Closed IncompleteApproved14/01/2021 12:00173 
CHG0048728Closed FailedApproved27/10/2020 11:45252 
CHG0050054Work in ProgressRetrospective30/06/2021 10:4261
CHG0050045Work in ProgressApproved17/06/2021 12:16191
CHG0049491ReschedulingPending CAB26/03/2021 11:001021
CHG0049588ReschedulingApproved30/04/2021 11:30671
CHG0048692ReschedulingApproved17/10/2020 04:002621
CHG0050091Work in ProgressRetrospective16/07/2021 15:47-10 
CHG0045214Closed Rolled BackApproved22/02/2019 22:30865 
CHG0046766Closed Rolled BackApproved21/12/2019 12:30563 
CHG0050143Work in ProgressApproved09/07/2021 20:33-3 

 

In the above example, I would need it to return the value of 7

 

Any help would be most appreciated!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

[Count] =
CALCULATE(
    // Assumpition: Tickets
    // is a table that has one row
    // per a unique ticket.
    COUNTROWS( Tickets ),
    KEEPFILTERS(
        Tickets[Overdue Days] > 5
    ),
    KEEPFILTERS(
        Tickets[State] in {
            "Open",
            "Work in Progress"
        }
    ),
    KEEPFILTERS(
        Tickets[Approval State] in {
            "Approved",
            "Pending CAB",
            "Retrospective"
        }
    )
)

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

[Count] =
CALCULATE(
    // Assumpition: Tickets
    // is a table that has one row
    // per a unique ticket.
    COUNTROWS( Tickets ),
    KEEPFILTERS(
        Tickets[Overdue Days] > 5
    ),
    KEEPFILTERS(
        Tickets[State] in {
            "Open",
            "Work in Progress"
        }
    ),
    KEEPFILTERS(
        Tickets[Approval State] in {
            "Approved",
            "Pending CAB",
            "Retrospective"
        }
    )
)

Perfect!  Exactly what I needed.  Many Thanks

AB1
Regular Visitor

AB1_0-1625565021972.png

Here's a screenshot of my data table in case my original post wasn't clear.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

Find out what's new and trending in the Fabric Community.