cancel
Showing results for
Did you mean:
Highlighted
Regular Visitor

## First of month

I have one question.
I need check if today's date is the first working day of the month.how can it be done
1 ACCEPTED SOLUTION

Accepted Solutions
Super User IV

## Re: First of month

`First Working Day of Month = VAR TodaysDate = TODAY()VAR Calendar1 = CALENDAR(DATE(YEAR(TodaysDate),1,1),DATE(YEAR(TodaysDate),12,31))VAR Calendar2 = ADDCOLUMNS(Calendar1,"Month",MONTH([Date]))VAR Calendar3 = ADDCOLUMNS(Calendar2,"WeekDay1",WEEKDAY([Date],2))VAR TodaysMonth = MONTH(TodaysDate)VAR Calendar4 = FILTER(Calendar3,[Month]=TodaysMonth&&[WeekDay1]<6)VAR FirstWorkingDay = MINX(Calendar4,[Date])RETURN FORMAT(FirstWorkingDay,"mm/dd/yyyy")`

### I have book! Learn Power BI from Packt

Proud to be a Datanaut!

4 REPLIES 4
Super User IV

## Re: First of month

`First Working Day of Month = VAR TodaysDate = TODAY()VAR Calendar1 = CALENDAR(DATE(YEAR(TodaysDate),1,1),DATE(YEAR(TodaysDate),12,31))VAR Calendar2 = ADDCOLUMNS(Calendar1,"Month",MONTH([Date]))VAR Calendar3 = ADDCOLUMNS(Calendar2,"WeekDay1",WEEKDAY([Date],2))VAR TodaysMonth = MONTH(TodaysDate)VAR Calendar4 = FILTER(Calendar3,[Month]=TodaysMonth&&[WeekDay1]<6)VAR FirstWorkingDay = MINX(Calendar4,[Date])RETURN FORMAT(FirstWorkingDay,"mm/dd/yyyy")`

### I have book! Learn Power BI from Packt

Proud to be a Datanaut!

Regular Visitor

## Re: First of month

Super.It worked.Thank you.

Super User IV

## Re: First of month

Awesome, I actually just posted a whole series of these measures to the Quick Measures gallery for First/Last working day of Week, Month, Quarter and Year. Let me know if I'm missing anything that you would like to see:

https://community.powerbi.com/t5/Quick-Measures-Gallery/First-Last-Working-Days/m-p/391545

### I have book! Learn Power BI from Packt

Proud to be a Datanaut!

Regular Visitor

## Re: First of month

@Greg_Deckler

Hello,

Can we get the first of month using query editor?

Announcements

#### Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

#### Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

#### Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!