Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

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
  • 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/

     

     

     

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    legend thank you Vahid Agha ğŸ˜Š

  • 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's avatar
      Anonymous
      Not applicable

      Thank you Vahid.

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