Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
There is a couple of messages regarding this but I have found the easiest might be this code by creating a calendar table and number 1-7 the days. But I also included a number 8 for publich holiday. This code also counts if start date and end date is on the same date that it is 1 where a lot does not count it. The problem that I'm facing is in the or statement where it looks like you can only have two arguments where I need their either 1, 7 and 😎 as listed below
Solved! Go to Solution.
Hi @Anonymous
Try this then as a cal. column:
Counting =
CALCULATE (
COUNTROWS ( 'Calendar' ),
FILTER (
ALL ( 'Calendar' ),
'Calendar'[Date] >= 'Leave'[Leave Start Date]
&& 'Calendar'[Date] <='Leave'[Leave End Date]
&& 'Calendar'[DayNumber] IN { 2, 3, 4, 5, 6 }
)
)
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
As a calculated colomn
| No | Leave Start | Leave End |
| 100 | 23/03/2021 | 23/03/2021 |
| 200 | 25/03/2021 | 30/03/2021 |
| 100 | 26/03/2021 | 28/03/2021 |
| 300 | 1/04/2021 | 3/04/2021 |
| 300 | 10/04/2021 | 11/04/2021 |
Hi @Anonymous
Try this then as a cal. column:
Counting =
CALCULATE (
COUNTROWS ( 'Calendar' ),
FILTER (
ALL ( 'Calendar' ),
'Calendar'[Date] >= 'Leave'[Leave Start Date]
&& 'Calendar'[Date] <='Leave'[Leave End Date]
&& 'Calendar'[DayNumber] IN { 2, 3, 4, 5, 6 }
)
)
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Thanks for the quick response. I tried it but it just returns blanks although should be days to count
@Anonymous
Can you pleae share a sample of your tables in a text format?
Do want a measure? or calculated column?
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Hi @Anonymous
Try this:
Counting =
CALCULATE (
COUNTROWS ( 'Calendar' ),
FILTER (
ALL ( 'Calendar' ),
'Calendar'[Date] >= MAX ( 'Leave'[Leave Start Date] )
&& 'Calendar'[Date] <= MAX ( 'Leave'[Leave End Date] )
&& 'Calendar'[DayNumber] IN { 2, 3, 4, 5, 6 }
)
)
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 1 |
| User | Count |
|---|---|
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 |