Forum Discussion

Milozebre's avatar
Milozebre
Icon for Helper V rankHelper V
9 years ago
Solved

Condition in a measure

Hello,
I have a question because I block to make an indicator.
I have to calculate a service level indicator.
Here is what I would like to do: add all calls processed whose waiting time is less than or equal to 120 divided by the total number of calls processed
My queries are under SQL and I have data:
Call processed - WaitingTime

Can you help me make this request or this measure because I can't insert this condition.

 

thank you in advance

  • Sean's avatar
    Sean
    9 years ago

    Okay try this instead

    Mesure 2 =
    DIVIDE (
        CALCULATE (
            SUM ( 'ACD - APPEL'[AppelTraite] ),
            FILTER ( ALLSELECTED ( 'ACD - APPEL' ), 'ACD - APPEL'[DureeAttente] <= 120 )
        ),
        CALCULATE ( SUM ( 'ACD - APPEL'[AppelTraite] ), ALLSELECTED ( 'ACD - APPEL' ) ),
        0
    )

7 Replies

  • Phil_Seamark's avatar
    Phil_Seamark
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi Milozebre,

     

    This sounds achievable, but for us to build a measure as close as possible to your needs, can you please post a sample set of data.

     

     

    • Milozebre's avatar
      Milozebre
      Icon for Helper V rankHelper V

      Good Morning Phil, 

       

      Thank you for your reply.

       

      Here is the begining of the measure : Mesure 2 = SUM('ACD - APPEL'[AppelTraite]) / SUM('ACD - APPEL'[AppelTraite])

      But i want to do : sum of all appel traite where ('ACD - APPEL'[DureeAttente]) is <= 120 divided by the total of ACD - APPEL'[AppelTraite])

       

       

      • Sean's avatar
        Sean
        Icon for Community Champion rankCommunity Champion

        Here's something to get you going... :smileyhappy:

         

        Mesure 2 =
        DIVIDE (
            CALCULATE (
                SUM ( 'ACD - APPEL'[AppelTraite] ),
                FILTER ( ALL ( 'ACD - APPEL' ), 'ACD - APPEL'[DureeAttente] <= 120 )
            ),
            CALCULATE ( SUM ( 'ACD - APPEL'[AppelTraite] ), ALL ( 'ACD - APPEL' ) ),
            0
        )