Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi,
I am trying to take a measure that sums up customers (sumx) and then shows the last 12 months.
Date | Enrollment Count | LTM |
7/1/2024 0:00 | 307 | 5685 |
8/1/2024 0:00 | 57 | 5499 |
9/1/2024 0:00 | 428 | 5681 |
10/1/2024 0:00 | 428 | 5863 |
11/1/2024 0:00 | 428 | 6045 |
12/1/2024 0:00 | 428 | 6227 |
1/1/2025 0:00 | 1044 | 6422 |
2/1/2025 0:00 | 1044 | 6617 |
3/1/2025 0:00 | 1044 | 6812 |
4/1/2025 0:00 | 1058 | 7022 |
5/1/2025 0:00 | 489 | 7150 |
6/1/2025 0:00 | 493 | 7248 |
7/1/2025 0:00 | 262 | 7203 |
8/1/2025 0:00 | 21 | 7167 |
Solved! Go to Solution.
To calculate a Last Twelve Months (LTM) version of your Enrollment Count measure, you’ll want to wrap it in a CALCULATE that filters the date range to the last 12 months based on your TimeCalendar table.
Enrollment Count LTM =
CALCULATE (
[Enrollment Count],
DATESINPERIOD (
'TimeCalendar'[Date],
MAX ( 'TimeCalendar'[Date] ),
-12,
MONTH
)
)
--------------------------------
I hope this helps, please give kudos and mark as solved if it does!
Connect with me on LinkedIn.
Subscribe to my YouTube channel for Fabric/Power Platform related content!
Hi @zeppelin77bc ,
I would also take a moment to thank @wardy912 , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions
Hi @zeppelin77bc here are some quick fix
Enrollment Count LTM =
CALCULATE (
[Enrollment Count],
DATESINPERIOD (
'TimeCalendar'[Date],
MAX ( 'TimeCalendar'[Date] ),
-12,
MONTH
)
)
Another options
Enrollment Count LTM =
CALCULATE (
[Enrollment Count],
DATESBETWEEN (
'TimeCalendar'[Date],
EDATE(MAX('TimeCalendar'[Date]), -12),
MAX('TimeCalendar'[Date])
)
)
Note: Make sure your 'TimeCalendar'[Date] column must be properly formatted as a Date data type and contain continuous dates.
Find this helpful? ✔ Give a Kudo • Mark as Solution – help others too!
To calculate a Last Twelve Months (LTM) version of your Enrollment Count measure, you’ll want to wrap it in a CALCULATE that filters the date range to the last 12 months based on your TimeCalendar table.
Enrollment Count LTM =
CALCULATE (
[Enrollment Count],
DATESINPERIOD (
'TimeCalendar'[Date],
MAX ( 'TimeCalendar'[Date] ),
-12,
MONTH
)
)
--------------------------------
I hope this helps, please give kudos and mark as solved if it does!
Connect with me on LinkedIn.
Subscribe to my YouTube channel for Fabric/Power Platform related content!
Thanks. Those really helped.