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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
ovanslyke
Frequent Visitor

Days Left in Year and % of the year that has elapsed

I hope someone can help me. I have tried a number of different calculations by nothing is really working.

 

What formula do I need to calculate the number of days left in the year?

 

What formula do I need to show the % of the year that has elapsed?

 

Thank you!

 

1 ACCEPTED SOLUTION
v-caliao-msft
Microsoft Employee
Microsoft Employee

@ovanslyke,

 

Please ues the DAX below.
DayOfYear = DATEDIFF ( DATE ( YEAR ( 'Date'[Date]), 1, 1 ), 'Date'[Date], DAY ) + 1
Elapsed = (DATEDIFF ( DATE ( YEAR ( 'Date'[Date]), 1, 1 ), 'Date'[Date], DAY ) + 1)/(DATEDIFF ( DATE ( YEAR ( 'Date'[Date]), 1, 1 ),  DATE ( YEAR ( 'Date'[Date]), 12, 31 ), DAY ) + 1)
Capture.PNG

 

Regards,

Charlie Liao

View solution in original post

8 REPLIES 8
v-caliao-msft
Microsoft Employee
Microsoft Employee

@ovanslyke,

 

Please ues the DAX below.
DayOfYear = DATEDIFF ( DATE ( YEAR ( 'Date'[Date]), 1, 1 ), 'Date'[Date], DAY ) + 1
Elapsed = (DATEDIFF ( DATE ( YEAR ( 'Date'[Date]), 1, 1 ), 'Date'[Date], DAY ) + 1)/(DATEDIFF ( DATE ( YEAR ( 'Date'[Date]), 1, 1 ),  DATE ( YEAR ( 'Date'[Date]), 12, 31 ), DAY ) + 1)
Capture.PNG

 

Regards,

Charlie Liao

Thanks for the reply Charlie. I made a simply tabe with a date colum in this format 1/1/2017 and included all dates to 12/31/2017. I tried both DAX formulas in two different colums (DayOfYear and Elapsed) and keep getting this error:

 

Too many arguments were passed to the YEAR function. The maximum argument count for the function is 1

 

Can you advise?

 

Thanks!

 

Olivia

@ovanslyke,

 

Could you please share your DAX expression?

 

Regards,

Charlie Liao

I tried it again and your solution worked perfectly! Thank you!!

How do i get todays information to show up now in my card visualization? Do I need to create a measure?

 

I would like to be able to refresh and have it will always bring in the correct % through the year (year elapsed).

How do i get todays information to show up now in my card visualization? Do I need to create a measure?

 

I would like to be able to refresh and have it will always bring in the correct % through the year (year elapsed).

@ovanslyke,

 

You can just create a measure like

today = TODAY() to get current date, and show this measure in a card visual.

 

Regards,

Charlie Liao

@v-caliao-msft

 

Can you help me again please? Thanks!

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.