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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Creating dynamic trailing twelve month period trend based on user selected date

Hello,

 

We look at trended trailing twelve month period ("TTM") frequently due to seasonality in our business.  I am thinking about switching my team from cognos to Power BI and am in the process of exploring Power BI's capabilities.  One major issue with Power BI is the creation of trended TTM periods (ex.  TTM ended Oct 2015, TTM ended Oct 2014, TTM ended Oct 2013, etc).  This requires the use of a user-prompt to determine which month the TTM periods will end on.  However, it doesn't look like there is such a thing as user prompts / parameters in Power BI (we would be using Power BI desktop to author and then push the visuals to Power BI cloud for remote users to use). 

 

Since there is not built-in TTM function / filter, I could add a column to the query that flags which TTM period each record falls in IF the query can be told when the TTM period ends.  How do I do this?  (have the user select which month the TTM period falls under and then pass that month to the query to calculate which TTM period each record falls under)? 

 

Any help is appreciated as Power BI looks like a great tool but this would if I can't generate trended TTM periods then I probably won't be able to switch my team to it.

 

Thanks!

 

 

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

You might look at PREVIOUSYEAR function:

https://support.office.com/en-US/article/PREVIOUSYEAR-Function-DAX-8f0edd1d-be6d-488c-9990-55775d0c8...

 

Or PARALLELPERIOD:

https://support.office.com/en-us/article/PARALLELPERIOD-Function-f38ab5a7-d88c-48a8-9eb2-dc67d5aa3f4...

 

Or perhaps a Time Pattern here:

http://www.daxpatterns.com/time-patterns/

 



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
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.

Top Solution Authors