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

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.

Reply
Anonymous
Not applicable

How to show the network days between two dates if those two dates are weekend dates

Hi Community,

 

I have two date columns which named as End date and Fy Year end.. Now i want to find out network days between those two days for that i used this measure which is giving proper count. See below:

 

NetWorkDaysEND =
VAR Calendar1 = CALENDAR(MIN('Query1'[END]),MAX('Query1'[FYEND]))
VAR Calendar2 = ADDCOLUMNS(Calendar1,"WeekDay",WEEKDAY([Date],2))
RETURN
COUNTX(FILTER(Calendar2,[WeekDay]<=5),[Date])
 
But I am facing one issue here, In my data Couple of End dates and FYEnd dates are same and those dates are Weekend dates. For those dates i am getting blank instead of blank i want 0.
 
What should i modify in my measure
 
Here is my screenshot of that dataCap.JPG

 

Please help me out from this

 

Thanks in advance

 

B V S Sudhakar

 

 
2 ACCEPTED SOLUTIONS
gooranga1
Power Participant
Power Participant

Hi @Anonymous 

 

You could try this amendment to force a zero where blank.

 

NetworkDays.PNG

View solution in original post

Anonymous
Not applicable

Hi @gooranga1,

 

Thank you for your answer.

But for my case i can't write like that so i wrote like this

NetWorkDaysEND =
VAR Calendar1 = CALENDAR(MIN('Query1'[END]),MAX('Query1'[FYEND]))
VAR Calendar2 = ADDCOLUMNS(Calendar1,"WeekDay",WEEKDAY([Date],2))
RETURN
COUNTX(FILTER(Calendar2,[WeekDay]<=7),[Date])- COUNTX(FILTER(Calendar2,[WeekDay]>=6),[Date])
 
This was worked for me

View solution in original post

2 REPLIES 2
gooranga1
Power Participant
Power Participant

Hi @Anonymous 

 

You could try this amendment to force a zero where blank.

 

NetworkDays.PNG

Anonymous
Not applicable

Hi @gooranga1,

 

Thank you for your answer.

But for my case i can't write like that so i wrote like this

NetWorkDaysEND =
VAR Calendar1 = CALENDAR(MIN('Query1'[END]),MAX('Query1'[FYEND]))
VAR Calendar2 = ADDCOLUMNS(Calendar1,"WeekDay",WEEKDAY([Date],2))
RETURN
COUNTX(FILTER(Calendar2,[WeekDay]<=7),[Date])- COUNTX(FILTER(Calendar2,[WeekDay]>=6),[Date])
 
This was worked for me

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.