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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
wbarnold
New Member

Calculating Pending/Backlog Using a Calendar Table

I am trying to calculate the backlog in our company based on a calendar table.  I have two tables, one is a calendar table and the second table contains the milestone dates and unique identifer for each request ('vWBA-Milestones).  Using import, I've managed to calculate the backlog (incomplete) for each date in a year using the calendar table, based on the date that each request was received and the date the work was released.  

 

Pending (All) = CALCULATE(
DISTINCTCOUNT('vWBA-Milestones'[RequestId]),
FILTER('vWBA-Milestones','vWBA-Milestones'[RequestDate Clean]<=MIN(vWBA_BI_Calendar[Calendar_Date]) && 'vWBA-Milestones'[ReleasedDate Clean]> Max(vWBA_BI_Calendar[Calendar_Date])))
 
I need to do the same thing using direct query.   The problem is that there are too many records and SQL throws out an error stating I have exceeded a 64,000 threshold.  I created another calendar table that only includes the first day of the week.  No errors, but I also get back no data.  Each date in the calendar table may or may not have a milestone date that matches in the milestone table.  Does anyone know how to do this or have a suggestion I could try?
1 REPLY 1
Anonymous
Not applicable

Hi @wbarnold ,

In my opinion, I'd like to suggest you add more condition to grouping records based on current category fields or add more filter to limit calculation records range.

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.