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.
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 "
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
46 | |
25 | |
19 | |
16 | |
8 |
User | Count |
---|---|
61 | |
50 | |
45 | |
20 | |
17 |