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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Difference between 2 calculated values

Hi Team, 

 

I'm new to DAX and appreciate some help.

I am trying to calculate the difference between FTE Salary Compa Ratio for Female to Male. 

 

I have created towo calculated fields to average filter on Male and another for female as below. 

All I'd like to do is get the difference between the two below calcs and divide the total by FTE Salary Compa Ratio. so basically Female FTE Salary Compa Ratio - Male FTE Salary Compa Ratio divided by FTE Salary Compa Ratio.

 

 

 

 

Female FTE Salary Compa Ratio = 
CALCULATE(
	AVERAGE('Report_Entry'[FTE Salary Compa Ratio]),
	'Report_Entry'[Gender] IN { "Female" }
)

 

 

 

 

 

 

 

 

 

Male FTE Salary Compa Ratio = 
CALCULATE(
	AVERAGE('Report_Entry'[FTE Salary Compa Ratio]),
	'Report_Entry'[Gender] IN { "Male" }
)

 

 

 

 

 

so my total outcome should come something like this.

Region
Average of FTE Salary Compa Ratio
Female FTE Salary Compa Ratio
Male FTE Salary Compa Ratio
Difference  
Australia1.00850.93040.9571 -0.02647
2 ACCEPTED SOLUTIONS
VahidDM
Super User
Super User

Hi @Anonymous 

 

Try this:
Measure = 

([Female FTE Salary Compa Ratio]-[Male FTE Salary Compa Ratio])/AVERAGE('Report_Entry'[FTE Salary Compa Ratio])


If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

 

View solution in original post

Iman Jan @Anonymous 

 

Change the format to percentage.

Select the measure that you created, then change the format:

VahidDM_0-1646801229265.png

 

The other way is to use Format DAX formula:

https://docs.microsoft.com/en-us/dax/format-function-dax

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

legend thank you Vahid Agha 😊

Thanks Iman Jan 🙂

VahidDM
Super User
Super User

Hi @Anonymous 

 

Try this:
Measure = 

([Female FTE Salary Compa Ratio]-[Male FTE Salary Compa Ratio])/AVERAGE('Report_Entry'[FTE Salary Compa Ratio])


If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

 

Anonymous
Not applicable

Thank you Vahid.

Last question.
How would i show that as a percent?

Iman Jan @Anonymous 

 

Change the format to percentage.

Select the measure that you created, then change the format:

VahidDM_0-1646801229265.png

 

The other way is to use Format DAX formula:

https://docs.microsoft.com/en-us/dax/format-function-dax

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.