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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Asroinfa_user
New Member

Calculate Ticket Backlog in Power BI Desktop

Hi All,

I have a report requirement to show a backlog columns as a rolling total of Previous month.

below is the Sample Data .

 

MonthOpenClosed
7/1/20244842
8/1/20243431
9/1/20244726
10/1/202410682
11/1/202418993
12/1/202415459
1/1/202513059

 

We can Assume backlog for July 24 is 0. For Aug months Onwards the logic should check the (Open+Backlog)-closed in July month.

Excel formaul: (B2+E2)-C2 to derived backlog for Aug month onwards.

 

Expected Result That I am looking. 

 

MonthOpenClosedBacklog
7/1/202448420
8/1/202434316
9/1/202447269
10/1/20241068230
11/1/20241899354
12/1/202415459150
1/1/202513059245
1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @Asroinfa_user 

The calculation is fairly simple if you use a separate date dimensions table in a one to many relationship to your fact table.

Backlog Start of Month = 
VAR _MinDAte =
    CALCULATE ( MIN ( DatesTbl[Date] ), ALLSELECTED ( DatesTbl ) )
VAR _MaxDate =
    CALCULATE ( MAX ( DatesTbl[Date] ), ALLSELECTED ( DatesTbl ) )
RETURN
    CALCULATE (
        SUM ( Backlog[Open] ) - SUM ( Backlog[Closed] ) + 0,
        FILTER (
            ALL ( DatesTbl ),
            DatesTbl[Date] < MIN ( DatesTbl[Date] )
                && DatesTbl[Date] >= _MinDAte
                && DatesTbl[Date] <= _MaxDate
        )
    )

danextian_1-1737643315536.png

Filtering by min and max dates is unnecessary. However, if you want to show 0 for instead of blank, it is better to add a condition to limit which rows 0 is added to. Otherwise and if you have dates in your calendar table that are outside the range of your fact table, you will start seeing 0 for those outside the range.

Please refer to the attached pbix for details.

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

3 REPLIES 3
Asroinfa_user
New Member

Thanks it worked. 

Anonymous
Not applicable

Hi @Asroinfa_user ,

I am happy to learn that you found the cause of the problem and fixed it.

Please accept danextian's reply as a solution, it will make it easier for other users who may be experiencing the same problem to find a solution.

Thank you for your understanding!

Best regards,

Lucy Chen

danextian
Super User
Super User

Hi @Asroinfa_user 

The calculation is fairly simple if you use a separate date dimensions table in a one to many relationship to your fact table.

Backlog Start of Month = 
VAR _MinDAte =
    CALCULATE ( MIN ( DatesTbl[Date] ), ALLSELECTED ( DatesTbl ) )
VAR _MaxDate =
    CALCULATE ( MAX ( DatesTbl[Date] ), ALLSELECTED ( DatesTbl ) )
RETURN
    CALCULATE (
        SUM ( Backlog[Open] ) - SUM ( Backlog[Closed] ) + 0,
        FILTER (
            ALL ( DatesTbl ),
            DatesTbl[Date] < MIN ( DatesTbl[Date] )
                && DatesTbl[Date] >= _MinDAte
                && DatesTbl[Date] <= _MaxDate
        )
    )

danextian_1-1737643315536.png

Filtering by min and max dates is unnecessary. However, if you want to show 0 for instead of blank, it is better to add a condition to limit which rows 0 is added to. Otherwise and if you have dates in your calendar table that are outside the range of your fact table, you will start seeing 0 for those outside the range.

Please refer to the attached pbix for details.

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.