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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Metric for sum based off max date in the week # (time) slicer.

Hi, 

 

I'm trying to get the sum of my inventory based on the maximum  week # from my slicer. 

For example, in the below image: 

  • The week #'s range is 34 to 37  
  • My Chain + Delivery KPI is $57,258,675
    • This is the sum of all 4 weeks

The Measure I'm trying to make can be seen in the tool bar below as well. 

 

The metric should report the inventory for only the 37th week, but I'm having a challenge with this one. 

slacey7070_2-1635017488945.png

 

 

Thank you for any help. 

 

 

1 ACCEPTED SOLUTION
speedramps
Super User
Super User

Inventory=
VAR maxweek = MAX( Calendar[week] )

RETURN
CALCULATE(
SUM( Sales[Amount] ),
Calendar[week] = maxweek
)

View solution in original post

2 REPLIES 2
speedramps
Super User
Super User

Inventory=
VAR maxweek = MAX( Calendar[week] )

RETURN
CALCULATE(
SUM( Sales[Amount] ),
Calendar[week] = maxweek
)

Anonymous
Not applicable

Amazing, thank you!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors