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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I would like to ask for help. I have 2 tables (Date table & UserMap table). In user map I have name of managers and their hire date.
I would like to count the number of working days each month starting on their hire date.
Solved! Go to Solution.
Hi @daXtreme
Thank you for that, I just have a question It seems the count is accumulating on my end.
Hi @kristel_tulio ,
You can try the following methods.
Measure:
Total Days M =
VAR N1 =
CALCULATE (
COUNT ( 'Date'[Workday] ),
FILTER (
'Date',
[Date] >= SELECTEDVALUE ( 'Table'[Date of entry] )
&& [Date] <= SELECTEDVALUE ( 'Table'[Date of separation] )
&& [Workday] = 1
)
)
VAR N2 =
CALCULATE (
COUNT ( 'Date'[Workday] ),
FILTER (
'Date',
[Date] >= SELECTEDVALUE ( 'Table'[Date of entry] )
&& [Date] <= TODAY ()
&& [Workday] = 1
)
)
RETURN
IF ( SELECTEDVALUE ( 'Table'[Date of separation] ) = BLANK (), N2, N1 )
| employee ID | Date of entry | Date of separation |
| 1 | 2/1/2022 | 5/1/2022 |
| 2 | 3/1/2022 | |
| 3 | 4/1/2022 | |
| 4 | 5/1/2022 | 8/31/2022 |
| 5 | 6/1/2022 | |
| 6 | 7/1/2022 |
Is this the result you expect?
Best Regards,
Community Support Team _Yinliw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @kristel_tulio ,
You can try the following methods.
Measure:
Total Days M =
VAR N1 =
CALCULATE (
COUNT ( 'Date'[Workday] ),
FILTER (
'Date',
[Date] >= SELECTEDVALUE ( 'Table'[Date of entry] )
&& [Date] <= SELECTEDVALUE ( 'Table'[Date of separation] )
&& [Workday] = 1
)
)
VAR N2 =
CALCULATE (
COUNT ( 'Date'[Workday] ),
FILTER (
'Date',
[Date] >= SELECTEDVALUE ( 'Table'[Date of entry] )
&& [Date] <= TODAY ()
&& [Workday] = 1
)
)
RETURN
IF ( SELECTEDVALUE ( 'Table'[Date of separation] ) = BLANK (), N2, N1 )
| employee ID | Date of entry | Date of separation |
| 1 | 2/1/2022 | 5/1/2022 |
| 2 | 3/1/2022 | |
| 3 | 4/1/2022 | |
| 4 | 5/1/2022 | 8/31/2022 |
| 5 | 6/1/2022 | |
| 6 | 7/1/2022 |
Is this the result you expect?
Best Regards,
Community Support Team _Yinliw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @daXtreme
Thank you for that, I just have a question It seems the count is accumulating on my end.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 16 | |
| 7 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 25 | |
| 13 | |
| 12 | |
| 10 | |
| 6 |