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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
munna825
New Member

Creating Trailing Twelve Month Sum with a measure - Turnover Rate

I am struggling to create a TTM chart that displays the sum of the last 12 months turnover rate. Calculating the turnover rate in itself was confusing. Now that I have the turnover rate I would like to calculate the trailing twelve months.

Below is the export of what the turnover rate looks at any given time in the month. Now to calculate the ttm of 2020-04 it would be the sum of all the rates between 2019-05 to 2020-04 which equals 93.29%. How can I create a measure that will help me calculate this and represent this in a TTM Chart?

 

Note: Turnover Rate is also a measure. 

Year-MonthTurnover Rate
2019-015.31%
2019-0210.62%
2019-038.93%
2019-046.67%
2019-0514.40%
2019-067.75%
2019-0717.52%
2019-0811.51%
2019-097.14%
2019-102.90%
2019-115.71%
2019-124.32%
2020-014.38%
2020-025.71%
2020-035.84%
2020-046.11%
1 ACCEPTED SOLUTION
v-jayw-msft
Community Support
Community Support

Hi @munna825 ,

 

You could check the measure below.

Measure 2 = SUMX(FILTER(ALL('Table'),'Table'[Year-Month]<=SELECTEDVALUE('Table'[Year-Month])&&'Table'[Year-Month]>EDATE(SELECTEDVALUE('Table'[Year-Month]),-12)),[Measure])

And the result in table visual will be shown as below.

1.PNG

 

Best Regards,

Jay

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

2 REPLIES 2
v-jayw-msft
Community Support
Community Support

Hi @munna825 ,

 

You could check the measure below.

Measure 2 = SUMX(FILTER(ALL('Table'),'Table'[Year-Month]<=SELECTEDVALUE('Table'[Year-Month])&&'Table'[Year-Month]>EDATE(SELECTEDVALUE('Table'[Year-Month]),-12)),[Measure])

And the result in table visual will be shown as below.

1.PNG

 

Best Regards,

Jay

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
amitchandak
Super User
Super User

@munna825 , try with a date table

Rolling 12 = CALCULATE([Turnover Rate]),DATESINPERIOD('Date'[Date],ENDOFMONTH(Table[Date]),-12,MONTH))

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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