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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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