Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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 "
User | Count |
---|---|
14 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
21 | |
11 | |
10 | |
9 | |
8 |