Forum Discussion

yanx1990's avatar
yanx1990
Frequent Visitor
7 years ago
Solved

Backlog issue when filter by Date

Dear PBI Community,   Glad to be part of the Power BI users since a few weeks, I learned a lot about Power BI and already generated a lot of reports but today, I'm facing an issue and I can't find ...
  • Anonymous's avatar
    Anonymous
    7 years ago

    HI yanx1990 ,

    You can consider to add all function to ignore all filters to get unfiltered records, then you can use condition filters on these records to get specific range backlog:

    Backlog Tickets =
    VAR currDate =
        MAX ( 'Fact_Incoming_Closed'[Date] )
    VAR Incoming_Tickets =
        CALCULATE (
            COUNT ( Fact_Incoming_Closed[Request ID] ),
            FILTER (
                ALL ( Fact_Incoming_Closed ),
                Fact_Incoming_Closed[Date] <= currDate
                    && Fact_Incoming_Closed[Status] = "Incoming"
            )
        )
    VAR Closed_Tickets =
        CALCULATE (
            COUNT ( Fact_Incoming_Closed[Request ID] ),
            FILTER (
                ALL ( Fact_Incoming_Closed ),
                Fact_Incoming_Closed[Date] <= currDate
                    && Fact_Incoming_Closed[Status] = "Closed"
            )
        )
    RETURN
        Incoming_Tickets - Closed_Tickets
    

    Regards,

    Xiaoxin Sheng