Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello,
I'm trying to generate a similar report as below where I want to compare daily orders (day over day) and how many of these orders were delivered (Cumulative).
Each month should be 60 days.
Sample Data:
order # | Order date | status | delivery date |
123 | 06/15/2020 | Completed | 07/01/2020 |
321 | 06/15/2020 | Completed | 07/13/2020 |
431 | 06/15/2020 | In Progress | |
312 | 06/20/2020 | Completed | 07/13/2020 |
645 | 06/20/2020 | Completed | 06/25/2020 |
753 | 06/20/2020 | Completed | 06/30/2020 |
423 | 06/20/2020 | Completed | 07/13/2020 |
234 | 06/20/2020 | Completed | 07/13/2020 |
678 | 06/20/2020 | Completed | 07/13/2020 |
987 | 06/20/2020 | Completed | 07/13/2020 |
870 | 06/20/2020 | In Progress | |
986 | 06/20/2020 | Completed | 07/13/2020 |
678 | 06/20/2020 | Completed | 07/13/2020 |
what is the best way to accomplish this?
Thanks,
Y
@Anonymous , Create a date table, join both date with that table. One will active join another will be inactive. Use userelation to activate the join
Cumm Order = CALCULATE(Count(Table[order #]),filter(date,date[date] <=maxx(date,date[date])), userelation(Date[Date],Table[Order date]))
or
Cumm Order = CALCULATE(Count(Table[order #]),filter(date,date[date] <=max(Table[Order date])), userelation(Date[Date],Table[Order date]))
Cumm delivery= CALCULATE(Count(Table[order #]),filter(date,date[date] <=maxx(date,date[date])), userelation(Date[Date],Table[delivery date]))
or
Cumm delivery= CALCULATE(Count(Table[order #]),filter(date,date[date] <=max(Table[delivery date])), userelation(Date[Date],Table[delivery date]))
Userelation is only needed for an inactive one. I have shown in both.
refer example
// Orders - fact table with orders, each line
// is one unique order.
// Calendar - date table connected to Orders
// in two ways:
// 1. Active connection
// [Date] 1 -- * [OrderDate]
// 2. Inactive connection
// [Date] 1 -- * [DeliveryDate]
// Columns in a fact table must always be
// hidden and slicing takes place via dimensions
// only. Calendar must be a Date table marked
// as such in the model.
[Orders Made] = COUNTROWS( Orders )
[Orders Delivered] =
CALCULATE(
[Orders Made],
USERELATIONSHIP(
Orders[DeliveryDate],
Calendar[Date]
)
)
// Cumulative number of orders made
// to date.
[Orders Made Cumul.] =
var __lastVisibleDate = MAX( Calendar[Date] )
var __result =
CALCULATE(
[Orders Made],
Calendar[Date] <= __lastVisibleDate
)
return
__result
// Cumulative number of orders delivered
// to date.
[Orders Delivered Cumul.] =
var __lastVisibleDate = MAX( Calendar[Date] )
var __result =
CALCULATE(
[Orders Delivered],
Calendar[Date] <= __lastVisibleDate,
KEEPFILTERS( Orders[Status] = "completed" )
)
return
__result
Note that in a correctly built model the fact table should all be hidden and slicing should only be done through dimensions. I've assumed, though, that Status will be still kept in the fact table and you'll want to slice by it, hence KEEPFILTERS( Orders[Status] = "completed" ). However, Status should also be kept in a dimension and, with some very specific exceptions, the fact table should be HIDDEN (can't stress this enough).
Best
D
Thank you @Anonymous and @amitchandak
Now, what I have looks like this:
and below is what I'd like to acheive, I want to represent each month to start from day 1 and keep going till 60.
Pease let me know if you need more calrification.
Thanks,
Y
Dears,
For more clarification. I'm doing this on excel, and I couldn't fiqure it out how to do it in Power BI.
Below is how I do it in excel, and this is excatly how i need it to be in Power BI.
Your support is much appreciated.
Regards,
Y
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.