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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
StuM
New Member

Insert Column for Max Working Days in a Month

Hi

 

I'm trying to insert a new column to show the number of working days in a month to be used for budget calculations as I need to align monthly budgets with daily sales.  I've created a YearMonth column to give me a unique identifier for each month and want to find the maximum value of WorkingDaysMTD for each month and want to insert this as a new column. 

 

TIA

 

StuM_0-1668162139783.png

 

1 ACCEPTED SOLUTION
StuM
New Member

Found the answer by modifying @Fowmy s solution here

 

I'm sure there may be a better or more elegant way to do this but I'm new to PBI so have to go with what works to start with

MaxWDinMonth =

VAR __YEAR = 'Calendar'[Year]
VAR __MONTH = 'Calendar'[Month]
RETURN
MAXX(
FILTER(
'Calendar',
'Calendar'[Year] = __YEAR && 'Calendar'[Month] = __MONTH && 'Calendar'[WorkingDaysMTD] > 0
),
'Calendar'[WorkingDaysMTD]
)

View solution in original post

1 REPLY 1
StuM
New Member

Found the answer by modifying @Fowmy s solution here

 

I'm sure there may be a better or more elegant way to do this but I'm new to PBI so have to go with what works to start with

MaxWDinMonth =

VAR __YEAR = 'Calendar'[Year]
VAR __MONTH = 'Calendar'[Month]
RETURN
MAXX(
FILTER(
'Calendar',
'Calendar'[Year] = __YEAR && 'Calendar'[Month] = __MONTH && 'Calendar'[WorkingDaysMTD] > 0
),
'Calendar'[WorkingDaysMTD]
)

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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