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
Ericwhv
Helper II
Helper II

Sum for specific part of the data

Hi All, 
thank you for reading this first!

i hope you could help me
i am writing a DAX measurment to reflect the number of container we will use
assume every 11000 KG cargo will need 1 Container
example, 7500 KG, it will need 1 Container, 15000 KG, it will need 2 container and 19000KG it wil need 2 Container as well

So, i got the sample data as below

LaneBKDETAWEIGHT_CHARGEABLE_KG
BOMHYD10/05/2023 22:0011/05/2023 14:45200
BOMHYD10/05/2023 22:0011/05/2023 14:45300
BOMHYD10/05/2023 22:0011/05/2023 14:45400
BOMHYD10/05/2023 22:0011/05/2023 14:45100
BOMHYD10/05/2023 22:0011/05/2023 14:45200
BOMHYD10/05/2023 22:0011/05/2023 14:45100
HYDDEL11/05/2023 20:0013/05/2023 12:364800
HYDDEL11/05/2023 20:0013/05/2023 12:368210
HYDDEL11/05/2023 20:0013/05/2023 12:365810
HYDDEL11/05/2023 20:0013/05/2023 12:361250
HYDDEL11/05/2023 20:0013/05/2023 12:361300
BOMHYD11/05/2023 22:0012/05/2023 14:45200
BOMHYD11/05/2023 22:0012/05/2023 14:45200
BOMHYD11/05/2023 22:0012/05/2023 14:45200
BOMHYD11/05/2023 22:0012/05/2023 14:453300
BOMHYD11/05/2023 22:0012/05/2023 14:45300

 

 

my prefered result will be

LaneWEIGHT_CHARGEABLE_KGNumber of Container
BOMHYD55002
HYDDEL213702

 

the BOMHYD lane, if based on the weight - 5500 KG, it should be 1 Container, but, not, I want it show 2 container because we put the BKD(departure date) in consideration.  
for BKD 10/05, we have 1300 KG cargo which required 1 container, and BKD 11/05, we have 4200 KG, whcih required 1 container as well
so, i want to result show 2 Container in there, not sure if anyone could help me?

Thank you!

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

2 REPLIES 2
Ahmedx
Super User
Super User

pls try this

Screen Capture #1323.pngScreen Capture #1327.pngScreen Capture #1325.png

@Ahmedx 
Thank you!

it is work, and this method is more easy understand than ChatGPT lol

 

Thank you!

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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