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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
mwats20
Regular Visitor

Day of Year Format

Hello,

 

I want to allow people to choose a range of the "day of year" (for example 9/27 - 10/15 of every year) to average across years.  I have the Day of Year DAX function worked out in its own Date table, but I don't expect the user to know that it is day 271 - 288.  Is there a way to show this form at Month_Day and choose a range?  

 

Similar question when I want to make a seasonality line graph chart with year as the legend and day of year as the x axis.  I have the graph looking the way I want, but I dont expect people to intuitvely know what each day of year actually is and I would like to change the format for "Day of Year" if possible here as well.

 

Thank you

4 REPLIES 4
amitchandak
Super User
Super User

@mwats20 , In M you have

https://docs.microsoft.com/en-us/powerquery-m/date-dayofyear

 

In DAX you can have, as a new column

Day of year = datediff(startofyear([Date]),[date],day)+1

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Yes, thank you, I have the day of year calc working already, it is more the format that I am trying to change.  Any ideas for how to make it look different than 1-365?  Something like Oct-1 or 10.1 or something where the user will know what actual month and day it is?

Hi  @mwats20 ,

 

Not sure whether I get the exact point,will "date hierarchy"help?

Annotation 2020-08-07 091408.png

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Greg_Deckler
Community Champion
Community Champion

@mwats20 - You *may* be able to do something around display formatting using the technique discussed here:

https://community.powerbi.com/t5/Quick-Measures-Gallery/Chelsie-Eiden-s-Duration/m-p/793639#M389



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.