Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have a data set that includes all line items sold, their due dates, actual ship dates, and value. I am able to calculate today's past due backlog (PDBL) by summing the value of all lines whose due date is before today but whose ship date is blank. What I want to do is to create a table that shows what the PDBL was on each day. I don't know how to do this. How can I create a table of dates and compare each line to the date in the table to say 'count me if my due date is before this day but my ship date is on or after this day'. I don't know how to create a table with dates that are not linked specifically to a date for each line item sold, because items can be counted in multiple days if they are late by multiple days. So if something was due 10/2/22 and shipped 10/4/22 I would want its value counted in both 10/3/22 and 10/4/22 of the table.
What date do I use in my output table? Do I have to somehow create a new field? Would I create a measure to reference this new date field and how do I do that?
Here is a quick very simplified example set of data and an example of what I want my output to look like:
Example Data
Order # | Order Date | Due Date | Ship Date | Value |
1 | 09/30/22 | 10/1/22 | 10/3/22 | $5 |
2 | 10/1/22 | 10/2/22 | 10/3/22 | $7 |
3 | 10/2/22 | 10/3/22 | 10/4/22 | $10 |
4 | 10/2/22 | 10/4/22 | 10/4/22 | $5 |
5 | 10/3/22 | 10/4/22 | 10/5/22 | $5 |
Output Visual:
Date | Backlog Value | Backlog Count |
10/02/22 | $5 | 1 |
10/03/22 | $12 | 2 |
10/04/22 | $10 | 1 |
10/05/22 | $5 | 1 |
Solved! Go to Solution.
Hi @aallman
First , you need create a date table to compare with Due date and Ship date . You can extract date from your sample data table . Create a calculated table like this :
Table 2 = CALENDAR(MIN('Table'[Due Date]),MAX('Table'[Ship Date]))
You will get a table like this :
Then create measures to return the sum and count .
Sum = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Due Date]<MIN('Table 2'[Date])&&'Table'[Ship Date]>=MIN('Table 2'[Date])))
count = CALCULATE(COUNT('Table'[Value]),FILTER(ALL('Table'),'Table'[Due Date]<MIN('Table 2'[Date])&&'Table'[Ship Date]>=MIN('Table 2'[Date])))
You will get the result you want .
Best Regards,
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @aallman
First , you need create a date table to compare with Due date and Ship date . You can extract date from your sample data table . Create a calculated table like this :
Table 2 = CALENDAR(MIN('Table'[Due Date]),MAX('Table'[Ship Date]))
You will get a table like this :
Then create measures to return the sum and count .
Sum = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Due Date]<MIN('Table 2'[Date])&&'Table'[Ship Date]>=MIN('Table 2'[Date])))
count = CALCULATE(COUNT('Table'[Value]),FILTER(ALL('Table'),'Table'[Due Date]<MIN('Table 2'[Date])&&'Table'[Ship Date]>=MIN('Table 2'[Date])))
You will get the result you want .
Best Regards,
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
9 | |
8 | |
8 | |
8 |
User | Count |
---|---|
13 | |
12 | |
11 | |
10 | |
9 |