Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
i have the following table:
Prod_ Order No_ | Operation No_ | Previous Operation No_ | Posting_Date | Output QTY from operation | "Delay" |
MO000305 | 310 | 309 | 10/24/2019 | 1 | 0 |
MO000305 | 311 | 310 | 10/25/2019 | 1 | 1 |
MO000305 | 312 | 311 | 10/25/2019 | 1 | 0 |
MO000305 | 313 | 312 | 10/26/2019 | 1 | 1 |
MO000305 | 314 | 313 | 10/27/2019 | 1 | 1 |
i need count the days between every operation, only for the the one that didnot occur on the same day,and make a total count for these days as "delay days".( i have added the delay coulmn)
on the original table i have many "prod _order_NO" with many operations and dates and QTY.
i need in the calcualtion to stop when the last operation is the current operation, and prudece the following:
Prod_ Order No_ | Operation No_ | Previous Operation No_ | Delay days | Output QTY |
MO000305 | 314 | 313 | 3 | 1 |
thanks!!!!
Ofir
Solved! Go to Solution.
@Anonymous ,
If I understand the issue, try this: My table is prodDelay
Delay sum = var _maxNo = CALCULATE(MAX(prodDelay[Operation No_]),ALLEXCEPT(prodDelay,prodDelay[Prod_ Order No_])) var _sumDelay = CALCULATE(SUM(prodDelay[Delay]), ALLEXCEPT(prodDelay,prodDelay[Prod_ Order No_])) return IF(prodDelay[Operation No_] = _maxNo,_sumDelay)
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel
Proud to be a Super User!
@Anonymous ,
If I understand the issue, try this: My table is prodDelay
Delay sum = var _maxNo = CALCULATE(MAX(prodDelay[Operation No_]),ALLEXCEPT(prodDelay,prodDelay[Prod_ Order No_])) var _sumDelay = CALCULATE(SUM(prodDelay[Delay]), ALLEXCEPT(prodDelay,prodDelay[Prod_ Order No_])) return IF(prodDelay[Operation No_] = _maxNo,_sumDelay)
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel
Proud to be a Super User!
Hi!
Thank you very much for the response.
do you use the "ALLEXCEPT" function to be able to isolate between the "
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
18 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
25 | |
10 | |
10 | |
9 | |
7 |