Forum Discussion

sks2701's avatar
sks2701
Helper III
5 years ago
Solved

Calculation

Hi- I have a data set from which I have to show in visuals the below calculation- can someone please help , how this can be achieved

 

Dropped Rate

Total count of dropped / Total count

 

Closed Rate

Total count of closed/ Total count

 

Approval Rate

Total count of In progress + Total count of under review/ total count

 

IDOverall Status
1In progress
2In progress
3In progress
4Under review
5In progress
6In progress
7In progress
8Under review
9In progress
10In progress
11In progress
12In progress
13In progress
14Under review
15In progress
16In progress
17In progress
18In progress
19In progress
20Under review
21Dropped
22In progress
23In progress
24In progress
25Closed
26In progress
27In progress
28In progress
29In progress
30In progress
31In progress
32In progress
33Under review
34In progress
35Under review
36In progress
37In progress
38In progress
39In progress
40Under review
41In progress
42In progress
43In progress
44In progress
45In progress
46Under review
47Under review
48In progress
49Closed
50In progress
51In progress
52Under review
53In progress
54In progress
55In progress
56In progress
57Under review
58Under review
59In progress
60In progress
61In progress
62Under review
63Under review
64Under review
65Under review
66In progress
67In progress
68Under review
69Under review
70In progress
71Closed
72Under review
73Under review
74In progress
75Under review
76In progress
77Dropped
78In progress
79In progress
80Dropped
81Closed
82Under review
83Under review
84In progress
85Under review
86Under review

 

 

  • Hi, sks2701 

    According to your description, you can try these measures:

    Dropped Rate =
    
    var _tatalcount=COUNTX(ALL('Table'),'Table'[ID])
    
    var _droppedcount=COUNTX(FILTER('Table',[Overall Status]="Dropped"),[ID])
    
    return DIVIDE(_droppedcount,_tatalcount)
    Closed Rate =
    
    var _tatalcount=COUNTX(ALL('Table'),'Table'[ID])
    
    var _closedcount=COUNTX(FILTER('Table',[Overall Status]="Closed"),[ID])
    
    return DIVIDE(_closedcount,_tatalcount)
    Approval Rate =
    
    var _tatalcount=COUNTX(ALL('Table'),'Table'[ID])
    
    var _approvalcount=COUNTX(FILTER('Table',[Overall Status]="In progress"||[Overall Status]="Under review"),[ID])
    
    return DIVIDE(_approvalcount,_tatalcount)

    You can set the measure type to “Percetage”, like this:

     

    And you can get what you want, like this:

     

    You can download my test pbix file here

     

    Best Regards,

    Community Support Team _Robert Qin

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

6 Replies

  • camargos88's avatar
    camargos88
    Community Champion

    sks2701 ,

     

    You can use these measures in a card:

    _DroppedRate = DIVIDE(CALCULATE(COUNTROWS('Table'), 'Table'[Overall Status] = "Dropped"), CALCULATE(COUNTROWS('Table'),  ALL('Table'[Overall Status])), 0)
    
    _ClosedRate = DIVIDE(CALCULATE(COUNTROWS('Table'), 'Table'[Overall Status] = "Closed"), CALCULATE(COUNTROWS('Table'),  ALL('Table'[Overall Status])), 0)
    
    _ApprovalRate = DIVIDE(CALCULATE(COUNTROWS('Table'), 'Table'[Overall Status] = "In progress"), CALCULATE(COUNTROWS('Table'),  ALL('Table'[Overall Status])), 0)
    • sks2701's avatar
      sks2701
      Helper III

      camargos88 : thanks a ton this really helped , however for approved rate the formula would be 

      (Total count of In progress + Total count of under review)/ total count

       

      Could you help for this too- thank you again!

  • camargos88's avatar
    camargos88
    Community Champion

    sks2701 ,

     

    _ApprovalRate = DIVIDE(CALCULATE(COUNTROWS('Table'), 'Table'[Overall Status] = "In progress") + CALCULATE(COUNTROWS('Table'), 'Table'[Overall Status] = "Under review"), CALCULATE(COUNTROWS('Table'),  ALL('Table'[Overall Status])), 0)
      • v-robertq-msft's avatar
        v-robertq-msft
        Community Support

        Hi, sks2701 

        Have you solved your problem? Would you like to accept the reply as a solution if you find it's useful?

        Thanks in advance!

         

        Best Regards,

        Community Support Team _Robert Qin

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

  • v-robertq-msft's avatar
    v-robertq-msft
    Community Support

    Hi, sks2701 

    According to your description, you can try these measures:

    Dropped Rate =
    
    var _tatalcount=COUNTX(ALL('Table'),'Table'[ID])
    
    var _droppedcount=COUNTX(FILTER('Table',[Overall Status]="Dropped"),[ID])
    
    return DIVIDE(_droppedcount,_tatalcount)
    Closed Rate =
    
    var _tatalcount=COUNTX(ALL('Table'),'Table'[ID])
    
    var _closedcount=COUNTX(FILTER('Table',[Overall Status]="Closed"),[ID])
    
    return DIVIDE(_closedcount,_tatalcount)
    Approval Rate =
    
    var _tatalcount=COUNTX(ALL('Table'),'Table'[ID])
    
    var _approvalcount=COUNTX(FILTER('Table',[Overall Status]="In progress"||[Overall Status]="Under review"),[ID])
    
    return DIVIDE(_approvalcount,_tatalcount)

    You can set the measure type to “Percetage”, like this:

     

    And you can get what you want, like this:

     

    You can download my test pbix file here

     

    Best Regards,

    Community Support Team _Robert Qin

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