Forum Discussion

sam_rea_02's avatar
sam_rea_02
Frequent Visitor
3 years ago
Solved

Need help on calculating running SL

 
Hi All,

 

Good day. I need your help on what dax function or calculation I should use for me to be able to get the running SL. Below is my sample data

 b   c   d    e
 TimeCalls Handled  Interval     Running SL
17:00 am        12  100%      100%
27:30 am        11   93%       97%
38:00 am        22  88%       92%
48:30 am        26  84%       89%

in computing running SL manually

in Row 1: e1=c1*d1/c

    row 2: e2= sum(c1:c2*d1:d2)/sum(c1:c2)

    row 3: e3= sum(c1:c3*d1:d3)/sum(c1:c3)

    row 4: e4= sum(c1:c4*d1:d4)/sum(c1:c4)

I have tried sumx for this but the output is incorrect. Please help. I am stuck for this calculation.

5 Replies

  • Hi sam_rea_02 ,

    You can follow below steps to get this output within your table,

    1. Create an Index column using Query editor as shown in the below screenshot,


    2. Create a column with below DAX expression,


    Calculated Data = 'Sample Data'[Calls Handled] * 'Sample Data'[  Interval]

    3. Then create another column “Running SL with DAX expression,

    Running SL = CALCULATE (

     SUM('Sample Data'[Calculated Data]),

        ALL ( 'Sample Data' ),

       'Sample Data'[Index] <= EARLIER ( 'Sample Data'[Index] )

    )/CALCULATE (

        SUM ( 'Sample Data'[Calls Handled]),

        ALL ( 'Sample Data' ),

       'Sample Data'[Index] <= EARLIER ( 'Sample Data'[Index] )

    )
    Please refer to the below screenshot for output,

     

    Thanks!

    Inogic Professional Services Division

    Power Platform and Microsoft Dynamics 365 CRM Development – All under one roof!

    Drop an email at [email protected]

    Services:  http://www.inogic.com/services/

    Power Platform/Dynamics 365 CRM Tips and Tricks:  http://www.inogic.com/blog/

    • sam_rea_02's avatar
      sam_rea_02
      Frequent Visitor

      Hi SamInogic ,

       

      Thanks for answering. I have applied all the steps you have mention but the output is not correct.

      Please see attached screenshot.

       

       

      • sam_rea_02's avatar
        sam_rea_02
        Frequent Visitor

        Will be okay to share the pbix? Thanks in advance