cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Calcuating Percentage of rejections

Hello,

 

I have a collection of data which the results is either displayed as "Approved" or "Rejected" in a week report query.  

 

In Power BI using DAX measure how would I calcuate the percentage of rejections of the total volume being received per. week ?

 

Thank you in advance for any help,

Don

 

WEEKC_IDRESULTS
17000000657520Approved
19000000657520Approved
12000000105257Approved
10000000142235Approved
25000000342207Approved
2000000350383Approved
7000000375003Approved
2000000409683Approved
18000000419944Approved
4000000419944Rejected
17000000416963Approved
15000000424073Approved
8000000421613Approved
16000000421704Approved
14000000429461Rejected
4000000432030Approved
2000000430685Approved
21000000428503Approved
9000000428349Rejected
21000000427792Approved
21000000450926Approved
11000000434513Approved
8000000450935Approved
8000000432420Approved
18000000438565Approved
9000000439147Approved
19000000435329Approved
16000000438210Approved
8000000437524Approved
20000000437080Approved
25000000437091Approved
15000000437349Approved
1000000437472Approved
23000000436848Rejected
2000000439186Approved
21000000439186Approved
17000000435332Approved
12000000434990Approved
11000000436361Approved
23000000439910Approved
10000000440783Rejected
6000000439539Approved
25000000438530Approved
20000000438101Rejected
8000000440621Approved
24000000437250Approved
7000000439590Approved
4000000435520Approved
10000000438885Approved
16000000441171Approved
7000000438874Approved
10000000436886Approved
11000000443684Approved
19000000445125Approved
17000000446495Approved
23000000448819Approved
24000000448644Rejected
25000000446701Approved
8000000441819Rejected
3000000447106Approved
12000000444961Approved
9000000448633Approved
21000000446808Approved
14000000441973Approved
23000000442388Approved
4000000443774Approved
17000000446420Approved
4000000444496Rejected
18000000447702Approved
11000000445675Approved
13000000445675Rejected
12000000446974Approved
4000000447633Approved
13000000448403Rejected
11000000449109Approved
21000000450859Approved
23000000450783Approved
1000000449324Approved
9000000453372Approved
9000000657423Approved
1000000453855Approved
24000000453794Approved
18000000451741Approved
8000000452333Rejected
24000000452102Approved
13000000452621Approved
18000000454813Approved
20000000451704Approved
6000000454255Rejected
15000000449084Approved
14000000448910Approved
19000000448910Approved
10000000453596Approved
14000000449049Approved
12000000458051Approved
15000000456611Approved
10000000456549Approved
20000000456684Approved
25000000457809Rejected
18000000458508Approved
23000000455989Approved
1000000457273Approved
11000000462038Approved
6000000460156Approved
9000000457134Approved
19000000458432Approved
23000000461973Approved
4000000455947Approved
11000000456806Approved
22000000459339Approved
19000000455861Approved
24000000458507Approved
1000000461312Rejected
10000000457698Approved
13000000465485Approved
6000000459467Approved
22000000457551Rejected
17000000458868Approved
25000000462496Approved
5000000456161Approved
4000000456161Approved
22000000462063Approved
17000000456293Approved
9000000461516Rejected
15000000460913Approved
14000000455369Approved
13000000459420Approved
12000000457466Approved
5000000464929Approved
15000000464953Approved
24000000465893Approved
1000000464074Approved
18000000464678Approved
23000000465509Approved
17000000465323Approved
4000000462866Approved
10000000462964Approved
8000000462917Approved
3000000467581Approved
15000000463055Rejected
10000000463292Approved
22000000467541Approved
18000000466910Approved
7000000467639Approved
9000000467729Approved
4000000467591Approved
25000000466340Approved
17000000468693Approved
25000000468503Rejected
14000000467010Approved
1000000468477Approved
24000000466028Approved
12000000469419Rejected
18000000464819Approved
13000000466743Approved
23000000467850Approved
15000000466805Approved
22000000466841Approved
10000000468390Approved
6000000467513Approved
10000000469928Approved
9000000469999Approved
6000000472069Approved
10000000475207Approved
23000000474698Approved
18000000470606Rejected
21000000469609Rejected
18000000469612Approved
15000000474653Approved
9000000472887Approved
4000000473096Approved
6000000473058Approved
3000000473073Approved
25000000473323Rejected
13000000473091Approved
14000000471286Approved
16000000473117Approved
14000000469737Approved
15000000471812Approved
13000000472635Approved
19000000475000Approved
23000000474541Approved
13000000472207Approved
3000000472089Approved
19000000475121Approved
2000000469853Rejected
4000000474352Approved
11000000474329Approved
3000000472932Approved
9000000472932Approved
25000000478565Approved
11000000479064Approved
3000000476096Approved
23000000479089Approved
5000000478283Approved
16000000479127Approved
23000000477135Rejected
9000000477980Approved
3000000482568Approved
4000000482671Approved
5000000482303Rejected
6000000482308Approved
7000000482715Approved
1000000476102Rejected
15000000481802Approved
2000000478762Rejected
7000000480758Approved
3000000482517Approved
10000000480877Approved
21000000478226Approved
2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Solution Sage
Solution Sage

Re: Calcuating Percentage of rejections

Hi @dcg38524 ,

You can create a measure like the following:

percentageof rejections =
CALCULATE (
    COUNTA ( 'Table'[RESULTS] ),
    FILTER ( 'Table', 'Table'[RESULTS] = "Rejected" )
)
    / COUNTA ( 'Table'[RESULTS] )

Results are as follows:

1.PNG

Here is a demo, please try it:

https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EaXXgBXbwLFMmLMRg1...

 

Best Regards,

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

View solution in original post

Highlighted
Solution Sage
Solution Sage

Re: Calcuating Percentage of rejections

Hi @dcg38524 ,

You can select the corresponding measure and change the Demical places to 0 in Modeling - Formatting. The result is as follows:

111.PNG

 

Best Regards,

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

View solution in original post

5 REPLIES 5
Highlighted
Resolver III
Resolver III

Re: Calcuating Percentage of rejections

Hello-

 

  This should do it:

 

Rejections = calculate(sum(TABLE NAME[RESULTS]),filter(TABLE NAME, TABLE NAME[RESULTS] = "Rejected"))/calculate(distinctcount(WEEK))

 

Jared

Highlighted
Solution Sage
Solution Sage

Re: Calcuating Percentage of rejections

Hi @dcg38524 ,

You can create a measure like the following:

percentageof rejections =
CALCULATE (
    COUNTA ( 'Table'[RESULTS] ),
    FILTER ( 'Table', 'Table'[RESULTS] = "Rejected" )
)
    / COUNTA ( 'Table'[RESULTS] )

Results are as follows:

1.PNG

Here is a demo, please try it:

https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EaXXgBXbwLFMmLMRg1...

 

Best Regards,

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

View solution in original post

Highlighted
Helper III
Helper III

Re: Calcuating Percentage of rejections

_ Joey, Thank you - your solution worked great;

 

Question the results are being illustrated as a decimal so I added "* 100" to the end of your DAX measure.  How would I format the result to repersent a % with no decimal point?

 

Thanks again,

Don

 

NOTE: This Percentage measure is being used as a line within a Stack Column

%Rejection.png

 

 

 

Highlighted
Solution Sage
Solution Sage

Re: Calcuating Percentage of rejections

Hi @dcg38524 ,

You can select the corresponding measure and change the Demical places to 0 in Modeling - Formatting. The result is as follows:

111.PNG

 

Best Regards,

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

View solution in original post

Highlighted
Helper III
Helper III

Re: Calcuating Percentage of rejections

Joey,

 

Excellent - works as you stated, thank you so much.

 

Best regards,

Don

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors