I wanted to obtain the top 10 s_country names on the basis of thr Headcount(Headcount = distinctcount(N_RR_ID)) could someone please suggest me a DAX query for the same.Above is a pic of my datasets and the columns I am using.
You can also apply RankX to the data and then use the page level filter to select how many items you would like to display. I rank our entire product line and then filter the page for top 10. That way, if someone wants the top 20 or top 50, I don't have to make any changes except to the filter.
Did I answer your question? Mark my post as a solution!
@Bhaskar As suggested earlier i have tried your solution. just for clarification I have a table with N_RR_Id and cust_name columns where N_RR_ID is the id number of the employee and cust_name = customer name . I tried headcount = DISTINCTCOUNT(F_RR_DETAIL[N_RR_ID]) Measure 1 = DISTINCTCOUNT([N_RR_ID]) Rank = Rankx(Allselected(f_RR_DETAIL)[,Measure 1],,Desc,Dense) I am getting rank as 1 for all the cust_name.