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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
Looking for a DAX measure that calculates the number of lunches to order for a specific day of the week based on the StartDate and EndDate of a course. Matrix that looks like this:
Course | Sun | Mon | Wed | Thu | Fri | Sat | Total |
ABC |
|
| 1 | 1 | 1 |
| 3 |
DEF |
| 1 | 1 |
|
|
| 2 |
Total | 0 | 1 | 2 | 1 | 1 | 0 | 5 |
Start and end dates are in a fact table.
Separate calendar dimension to be used for weekdays.
Hope this request makes sense😊
Basically tried applying this type of logic:
Count the number of delegates where the weekday(calendar[Date] is in the date range Weekday(table[StartDate]) and Weekday(table[EndDate])
Any assistance will be appreciated.
Thanks
Try something like:
Total Delegates =
CALCULATE (
SUM ( Table[Lunches] ),
WEEKDAY ( Calendar[Dates] ) IN { 1, 2, 3, 4, 5 }
)
Thanks - but this measure places the count in all the days and not just those within the date range.
Hi - sorry for error - Tuesday should be included:)
Create a measure that for each course and day sets a flag if the course is active that day ( start<=day and day<=end). Then count the flags.
What about courses that run on tuesdays?
Hi - Any idea on how to do this - relatively new to Power BI - would appreciate a pointer.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 9 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 27 | |
| 22 | |
| 19 | |
| 17 | |
| 11 |