Forum Discussion

bcbuckley13's avatar
bcbuckley13
Icon for Helper III rankHelper III
6 years ago

How to add filter to calculation

Hello all and TYIA

 

I have 4 status' that I use (Yes, No, Pending, Overdue). I would like this calculation to use all but the "Pending" status.

How can I add a filter to this to only remove the "Pending" status?

 

% Complete in 30 =

DIVIDE (

CALCULATE ( COUNT ( 'Contactless Service for TMs, SLs, RGMs'[Complete in 30]), 'Contactless Service for TMs, SLs, RGMs'[Complete in 30] = "YES" ),

CALCULATE ( COUNT ( 'Contactless Service for TMs, SLs, RGMs'[Complete in 30]), ALLSELECTED ( 'Contactless Service for TMs, SLs, RGMs'[Complete in 30])

))

2 Replies

  • bcbuckley13,

     

    Try this measure:

     

    % Complete in 30 =
    DIVIDE (
        CALCULATE (
            COUNT ( 'Contactless Service for TMs, SLs, RGMs'[Complete in 30] ),
            'Contactless Service for TMs, SLs, RGMs'[Complete in 30] = "YES",
            'Contactless Service for TMs, SLs, RGMs'[Status] <> "Pending"
        ),
        CALCULATE (
            COUNT ( 'Contactless Service for TMs, SLs, RGMs'[Complete in 30] ),
            ALLSELECTED ( 'Contactless Service for TMs, SLs, RGMs'[Complete in 30] ),
            'Contactless Service for TMs, SLs, RGMs'[Status] <> "Pending"
        )
    )
  • v-kelly-msft's avatar
    v-kelly-msft
    Icon for Community Support rankCommunity Support

    Hi bcbuckley13 ,

     

    Could you pls provide some sample data with expected output?Remember to remove the confidential information.

     

     

     

    Best Regards,
    Kelly

    Did I answer your question? Mark my post as a solution!