Skip to content
# Start coding here... 

Create a measure, called Discount Rate Ranking that use RANKX() function to provide a ranking of all employees listed in Dim_Employee[Employee], by their Average Discount Rate.

Don't forget to include ALL() within the to rank all employees of the Dim_Employee table.

Discount Rate Ranking = RANKX(ALL(Dim_Employee[Employee]), [Average Discount Rate])

Add Discount Rate Ranking to the Table visual. It seems that there are non-sales persons among the employees as well, since these don't have a Profit Ratio.

Go to the Dim_Employee table in the Data view and check which column specifies whether an employee is a salesperson or not.

Profit Ratio = AVERAGEX(Fact_Sales, DIVIDE(Fact_Sales[Profit],[Total Sales]))

Reutrn to the Report view and use a classic dashboard filter on the Table visual to only include Is Salesperson = 1 from the Dim_Employee table.

Question: Why cannot I combine the two actions into one & what is wrong with my code****

Salers discount rank = RANKX(
Filter(Dim_Employee, Dim_Employee[Is Salesperson] = 1),
ALL(Dim_Employee[Employee]), [Profit Ratio])