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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
A-Rae
New Member

DAX formula for Percentage between two columns

Hello,

I'm new to Power BI/DAX.  I need to create a column on my table to show the percentage of the New Sales column compared to the salesperson's Quota column (see pic), their % Achievement .  For example, with the below picture, the % Achievement for the for the first 2 lines would be 0% and 5% respectively. 
These columns are each from separate Salesforce Reports, if that matters.

 

Any ideas for how to get this to work would be appreciated. 

Thank you!

 

2022-12-09 14_22_33-Monthly Sales Dashboard - Power BI Desktop.png

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @A-Rae 

try to

1)create a measure with this code:

Achievement%=
FORMAT(
    DIVIDE(
        SUM(Sales[Sales]),
        SUM(Budget[Quota]),
     ),
    "0.0%"
)
 
2)then plot any visual with this measure.

View solution in original post

3 REPLIES 3
Nico_Kl
Frequent Visitor

To create a column that shows the percentage of New Sales compared to the salesperson's Quota in DAX, you can use the following formula:

 

New Sales % = DIVIDE(New Sales, Quota)

 

This formula will divide the New Sales column by the Quota column and return the result as a decimal value. To convert the decimal value to a percentage, you can multiply the result by 100 and add the % symbol.

Here is an example of how the formula could be used in DAX:

 

 New Sales % = FORMAT(New Sales / Quota, "0.00%")

 

This formula will divide the New Sales column by the Quota column, format the result as a percentage with two decimal places, and add the % symbol.

 

Please note that the exact syntax and names of the columns and functions may vary depending on your specific data set and Power BI configuration.

v-xiaotang
Community Support
Community Support

Hi @A-Rae 

Please share some sample data and expectd output.

 

Best Regards,

Community Support Team _Tang

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

FreemanZ
Super User
Super User

hi @A-Rae 

try to

1)create a measure with this code:

Achievement%=
FORMAT(
    DIVIDE(
        SUM(Sales[Sales]),
        SUM(Budget[Quota]),
     ),
    "0.0%"
)
 
2)then plot any visual with this measure.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors