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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
smshetty
Frequent Visitor

How to calculate % of Year completion based on days

Hi ,

 

I need Dax formula to calculate the Days in the year which is completed. Example : 2020 has 365 and as of today we have completed 43 days in year. I need a formula in DAX to calculate =43/365 =12 % of the days in the current year is completed

 

My below formula gives me days completed in a given month 

 Ex: Below one gives me the Rate of Month completion w r t Days 

CALCULATE (
DIVIDE (DAY( TODAY () ), DAY ( LASTDATE ( '[Date]) ), 0 )*100,
FILTER (
ALL ( 'Date ),
YEAR ( Date) = YEAR ( TODAY () )
&& MONTH ( Date ) = MONTH ( TODAY () )
&& DAY ( Date ) = DAY ( TODAY () )

)
)
1 ACCEPTED SOLUTION
Anonymous
Not applicable

@smshetty Please try below measure to get the percentage

Measure = 
VAR _currentdate = SELECTEDVALUE(Test[Date])
VAR _basedate = DATE(YEAR(_currentdate),1,1)
VAR _days = DATEDIFF(_basedate,_currentdate,DAY)
RETURN DIVIDE(_days,365,0)

View solution in original post

3 REPLIES 3
nhoward
Resolver I
Resolver I

Hi @smshetty 

 

A Date Table (Master Calendar) with a column for day number, would be helpful.  

Anonymous
Not applicable

@smshetty Please try below measure to get the percentage

Measure = 
VAR _currentdate = SELECTEDVALUE(Test[Date])
VAR _basedate = DATE(YEAR(_currentdate),1,1)
VAR _days = DATEDIFF(_basedate,_currentdate,DAY)
RETURN DIVIDE(_days,365,0)
Anonymous
Not applicable

Can you help me how to get this for my measure?

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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