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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
eishman
Frequent Visitor

Align Day and Date according to 1st Business Day of Each Month

Hi

I am stuck with the following problem.

I am trying to align daily app login stats according to the week of the login.

 

Example : 

Monday 3 Feb | Week 1 of February | 7 Login 

    would need to be compared to 

Monday 2 March | Week 1 of March | 5 Logins

 

And then all subsequent days would match according to the day of the week ie Tuesday 4 Feb vs Tuesday 3 March.

 

I am able to create a measure and/or column to identify the week no, the week no of the month, the 1st working day of the month, 1st Sunday or Monday of the month etc, but cannot incorporate this into a visual that matched accordingly.

 

Any guidance would be appreciated. 

 

3 REPLIES 3
amitchandak
Super User
Super User

Create a working day in calendar

Work Day

 

Then have new column like

Work day No = countx(filter(date,Date[Month year] = earlier(Date[Month year]) &&  Date[Date] <= earlier(Date[Date])),date[Work day])

 

Thanks, appreciate the quick response. 

 

In your example :

What does [Work day] column hold ?

Month year is just a column : FORMAT('Date'[Date],"mmm yyyy") ?

 

I use the following measure to get the 1st Monday of the each month

 

Is 1st Monday =
VAR a = MIN('Date'[Date])
VAR y = FILTER(
ALL('Date'[Date]),
YEAR('Date'[Date]) = YEAR(a) &&
MONTH('Date'[Date]) = MONTH(a) &&
DAY([Date]) > 0 &&
DAY([Date]) < 8 &&
WEEKDAY([Date],2) = 1)
RETURN MAXX(y,[Date])

 

I can't upload file unfortunately as our network access does not allow for it

@eishman ,

 

Could you please paste some sample data and clarify more details about the expected result?

 

Regards,

Jimmy Tao

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.