Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I created a working days table that identifies each day of the year 2021 as a working day or not using @amitchandak's example here from 2020
Here's what my date table now looks like:
My objective is to create a measure that calculates the number of working days elapsed from one date, to the current date. Here's an example below of what I'm trying to achieve
Latest Submission Date is my data, that I need to subtract from the current date, but only counting working days
Latest Submission Date | New measure here: working days elapsed |
1/20/2021 | ?? |
1/21/2021 | ?? |
1/22/2021 | ?? |
1/23/2021 | ?? |
1/19/2021 | ?? |
1/1/2021 | ?? |
Solved! Go to Solution.
Hi @Anonymous ,
Based on your description, you can create a measure as follows.
working days elapsed =
VAR x1 =
FILTER (
ALL ( 'calendar' ),
[Date] <= TODAY ()
&& [Date] >= SELECTEDVALUE ( 'Submit'[Latest Submission Date ] )
&& WEEKDAY ( [Date], 2 ) < 6
)
RETURN
COUNTROWS ( x1 )
Today is 2/22/2021.
Result:
Hope that's what you were looking for.
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Based on your description, you can create a measure as follows.
working days elapsed =
VAR x1 =
FILTER (
ALL ( 'calendar' ),
[Date] <= TODAY ()
&& [Date] >= SELECTEDVALUE ( 'Submit'[Latest Submission Date ] )
&& WEEKDAY ( [Date], 2 ) < 6
)
RETURN
COUNTROWS ( x1 )
Today is 2/22/2021.
Result:
Hope that's what you were looking for.
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , Try a new measure
Work Day = COUNTROWS(FILTER(ADDCOLUMNS(CALENDAR(max(Table[Latest Submission Date]),TODAY()),"WorkDay", if(WEEKDAY([Date],2) <6,1,0)),[WorkDay] =1))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
94 | |
77 | |
65 | |
53 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |