Forum Discussion

MJAGUSIAK's avatar
MJAGUSIAK
Icon for Helper I rankHelper I
4 years ago
Solved

Need help with measure when summing filtered data

All- new to this forum, so thanks for this. I work in fraud prevention and  I am trying to write a measure that will help me compute the total approval percentage of my sales minus a subset of order...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi MJAGUSIAK ,

    Try measures as below.

    Measure- Business rule declines:

     

    Business rule declines =
    VAR _Total =
        CALCULATE ( SUM ( 'POWER bi cybs DATA 3'[ORDER AMOUNT] ) )
    VAR _DeclinedTotal =
        CALCULATE (
            SUM ( 'POWER bi cybs DATA 3'[ORDER AMOUNT] ),
            FILTER ( 'SHEET 2', 'SHEET 2'[BUSINESS OR FRAUD] = "BUSINESS" )
        )
    RETURN
        _Total - _DeclinedTotal

     

    Measure - Business rule total amount:

     

    Business rule total amount =
    CALCULATE ( SUM ( 'POWER BI CYBS DATA 3'[ORDER AMOUNT] ) ) - [Business rule declines]

     

    Measure- Business fraud approval rate:

     

    Business fraud approval rate =
    VAR _system_reject =
        CALCULATE (
            SUM ( 'POWER BI CYBS DATA 3'[ORDER AMOUNT] ),
            FILTER (
                'POWER BI CYBS DATA 3',
                'POWER BI CYBS DATA 3'[ACTIVE PROFILE DECISION] = "REJECT"
            )
        )
    VAR _reviewer_reject =
        CALCULATE (
            SUM ( 'POWER BI CYCB DATA 3'[ORDER AMOUNT] ),
            FILTER ( 'Table', 'Table'[CASE MANAGER DECISION] = "REVIEWER REJECT" )
        )
    RETURN
    DIVID(_system_reject+_reviewer_reject,[Business rule total amount])
    

     

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.