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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
KimStahl94
Helper I
Helper I

Measure counting dates depending on employee vacation calender

Hello there,

I am trying to count the dates that each employee has to work until EOY. Therefore I need to filter the date table for each employee within the measure to return the correct amount of days to count. I have no problem filtering out the weekends but for the vacation days I am currently subtracting the amount of days listed in their related vacation calender.
So here is some sample data:
KimStahl94_0-1642599201784.png

KimStahl94_1-1642599234773.png

The Measure should return 363 for ID 1, 362 for ID 2 and 361 for ID 3.
It is important to not just subtract the amount of listed vacation days because I also need to check If they even are supposed to work on the specific date depending on their work schedule. This information is listed in another table which I can implement in the Measure if this issue has been solved.

Looking foreward to your responses. 

Regards

Kim

1 ACCEPTED SOLUTION
KimStahl94
Helper I
Helper I

Hello there,

so I was able to find a solution and wanted to share. Sry for bothering, but I tried fixing this issue since quite a time and finally I found the correct syntax as followed:

Remaining Days =

CALCULATE (
COUNT ('Calendar'[Date] ) ,
'Calendar'[Date] IN
EXCEPT (
ALL ( 'Calendar'[Date] ),
VALUES ( 'Vacation Dates'[Vacation Days] )
)
)
KimStahl94_0-1642601947929.png

 

Hopefully some of you finds value in this information.
Regards
Kim

View solution in original post

1 REPLY 1
KimStahl94
Helper I
Helper I

Hello there,

so I was able to find a solution and wanted to share. Sry for bothering, but I tried fixing this issue since quite a time and finally I found the correct syntax as followed:

Remaining Days =

CALCULATE (
COUNT ('Calendar'[Date] ) ,
'Calendar'[Date] IN
EXCEPT (
ALL ( 'Calendar'[Date] ),
VALUES ( 'Vacation Dates'[Vacation Days] )
)
)
KimStahl94_0-1642601947929.png

 

Hopefully some of you finds value in this information.
Regards
Kim

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.