Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Newbie22
Resolver I
Resolver I

Formula to get the Reject % for each country over the Total Volume of Medals per Month

Hi Experts.

 

Hope u all are having a great day.

 

Can you please help me with the correct DAX in order to get the desired result?

 

I need to get the Reject % for each country. Let's say for Egypt, I need to get the result of 3.57%. That is 2/56

Volume of Reject vs Total Volume per Medal.

 

Results must be:

Egypt = 3.57% (2 divided 56)

GDS Argetina =  0% (0 divided by 56)

GDS India = 23.21% (13 divided by 56)

 

and so on.. 

 

PeriodMedalCountryRejectTotal VolumeResult should be:
Aug-22GoldAll2056 
  Egypt223.57%
  GDS Argentina010.00%
  GDSIndia132823.21%
  GDS Poland223.57%
  Greece020.00%
  India 263.57%
  Pakistan020.00%
  Poland020.00%
  United Kingdom020.00%
  United States171.79%
  Zimbabwe020.00%

 

Newbie22_0-1665067191966.png

 

Let me know if you need more information. thank you 🤗

 

 

1 ACCEPTED SOLUTION

Hi Pablo, Thanks for the reply. 

 

I tried below measure and I got the expected result. Appreciate the time and effort you put in. ❤️

 

Expected result measure: =
DIVIDE (
SUM ( 'TableName'[Reject] ),
CALCULATE ( SUM ( 'TableName'[Volume] ), ALL ( 'TableName'[Country] ) )
)

View solution in original post

2 REPLIES 2
PabloDeheza
Solution Sage
Solution Sage

Hi @Newbie22 !
Your DAX should be something like this:

Reject % =
VAR _CurrentReject = [Reject]
VAR _Volume =
    CALCULATE(
        [Total Volume],
        ALLSELECTED( Country )
    )
RETURN
    DIVIDE(
        _CurrentReject,
        _Volume
    )

Let me know if that helps!

Hi Pablo, Thanks for the reply. 

 

I tried below measure and I got the expected result. Appreciate the time and effort you put in. ❤️

 

Expected result measure: =
DIVIDE (
SUM ( 'TableName'[Reject] ),
CALCULATE ( SUM ( 'TableName'[Volume] ), ALL ( 'TableName'[Country] ) )
)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.