Forum Discussion
Formula Hep with PWBI
- 1 year ago
Hi ahmer_malick , Thank you for reaching out to the Microsoft Community Forum.
Please try below:
Is_Current_Operation =
VAR CurrentOrder = Query1[SHOP ORDER]
VAR CurrentOpSeq = Query1[OPR NBR]
VAR ShopOrderQty = Query1[SHOP ORD QTY REQ]
VAR CurrentOpQty = Query1[QTY COMP AT OPS]
VAR CurrentOpPct = DIVIDE(CurrentOpQty, ShopOrderQty)
VAR MaxFutureOpPct = MAXX( FILTER( 'Query1', 'Query1'[SHOP ORDER] = CurrentOrder && 'Query1'[OPR NBR] > CurrentOpSeq ), DIVIDE('Query1'[QTY COMP AT OPS], 'Query1'[SHOP ORD QTY REQ]) )
VAR TotalPostedQty = CALCULATE( SUM('Query1'[QTY COMP AT OPS]), FILTER( 'Query1', 'Query1'[SHOP ORDER] = CurrentOrder ) )
VAR FirstOpSeq = CALCULATE( MIN('Query1'[OPR NBR]), FILTER( 'Query1', 'Query1'[SHOP ORDER] = CurrentOrder ) )
RETURN IF( CurrentOpPct > 0.9 && (ISBLANK(MaxFutureOpPct) || MaxFutureOpPct < 0.9), "Yes", IF( (ISBLANK(TotalPostedQty) || TotalPostedQty = 0) && CurrentOpSeq = FirstOpSeq, "Yes", "No" ) )
Hi ahmer_malick , hope you are doing great. May we know if your issue is solved or if you are still experiencing difficulties. Please share the details as it will help the community, especially others with similar issues.
Hi Yes. This help me . Thank you so much