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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
Ericwhv
Helper II
Helper II

Past 12 months Average

Hi All

 

I would like to work on some calutaion on past 12 month average of "Truck handle per HeadCount"

 

I have below existing formula

Trucks per HC = DIVIDE([Number of Trucks],[Total HC])
Total HC = CALCULATE(SUM('Cost&Budget'[Value]), 'Cost&Budget'[GNS Spent - USD]="HC")
Number of Trucks = DISTINCTCOUNT(Truck_Level[Truck_Level])
 
if i would like to know the pass 12 month average Trucks per HC, how can i do that?
for example, April, the trucker per HC is 32, i woud like to know the last 12 month from Mar to last year Apr average Truck per HC

Apr32
Mar21
Feb22
Jan22
Dec18
Nov19
Oct12
Sep15
Aug12
Jul10
Jun9
May8
Apr4
Last12AVG14.33
2 REPLIES 2
Anonymous
Not applicable

Hi @Ericwhv 

You can refer to the following sample

Sample data

vxinruzhumsft_0-1681958681332.png

 

Then create a measure

Measure = var a=SUMX(FILTER(ALL('Table'),OR('Table'[Year]=SELECTEDVALUE('Table'[Year])&&[Monthnum]<SELECTEDVALUE('Table'[Monthnum]),'Table'[Year]<SELECTEDVALUE('Table'[Year])&&[Monthnum]>=SELECTEDVALUE('Table'[Monthnum]))),[Trucks per HC])
return DIVIDE(a,12)

Output

vxinruzhumsft_1-1681958912061.png

Best Regards!

Yolo Zhu

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

 

lbendlin
Super User
Super User

please provide better sample data - at the minimum it needs to include the year. 

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.