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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

DAX measure for rolling one year calculation

Hi all,

I need to create a measure for the following simplified scenario. 

In my data set there is a date column and a value calumn. There is one record per day ( exccluding weekends and hilodays ) in this dataset.

In my visualizaation I have to skip first 252 days (first year ) , and for any given date after that divide the value for that date by the value for the day 252 prior to that date.

example 

Date                                                 Value

5/5/2016 ( start date)             101

5/6/2016                                         99

...

5/5/2017                                          105

5/6/2017                                          103

....

------------------------------------------------------------------------------------------------------------------

My visualtion should display the following .   Please note I don't wnat to show any records prior to 5/5/2017 in the visualization because there is no data for dates prior to   5/5/2016 in the dataset     (Date - Year ago)

5/5/2017                                         1.039    (calculation is : 105/101)

5/6/2017                                          1.040   (103/99)

........  

I hopw I was able to exxplain the requirment clearly. Thank you for you help.

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

See if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...



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
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.