cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Anonymous
Not applicable

## workingdays in measure and not in calculated column

Hi

We have the next calculated column to calculate the count of workingsdays between 2 dates.

`CALCULATE( COUNTROWS(Calender), DATESBETWEEN(Calender[Date],'table1'[first_date],table1'[second_date] -1), Calender[isworkday] = 1)`

Now we want to convert this formula to a measure so we are more flexibel in the calculations.
maybe something with an averagex?

Have someone any idea?

1 ACCEPTED SOLUTION
Community Support

Hi @Anonymous ,

Based on your description, you have create a column like [IsWorkingDay] using 1 to represent Working Days. You can try DAX formula like below:

``````Measure = CALCULATE(
COUNTROWS('Calender'),
DATESBETWEEN('Calender'[Date],SELECTEDVALUE('Table1'[first_date]),SELECTEDVALUE('Table1'[second_date])-1),
'Calender'[IsWorkDay]= 1)``````

Best Regards,

Liang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support

Hi @Anonymous ,

Based on your description, you have create a column like [IsWorkingDay] using 1 to represent Working Days. You can try DAX formula like below:

``````Measure = CALCULATE(
COUNTROWS('Calender'),
DATESBETWEEN('Calender'[Date],SELECTEDVALUE('Table1'[first_date]),SELECTEDVALUE('Table1'[second_date])-1),
'Calender'[IsWorkDay]= 1)``````

Best Regards,

Liang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Announcements

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

#### Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

#### Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors