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
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
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.