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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
xiumi_hou
Post Partisan
Post Partisan

How to use dax function to create bar chart and show rank?

Dear all, 

 

I have below measure, the y-axis is person name, and bar is the count numbers

lala.JPG

 

Completed Cases =
CALCULATE(
DISTINCTCOUNT(d_Cases[CaseNumber])+0,
d_Cases[Closure Reason] = "Completed",
USERELATIONSHIP(d_Cases[Closed_date_c],d_date[Date]),
USERELATIONSHIP(d_Cases[Assigned_user_id],d_users[id])
)
 
How can I revise ablove dax to show thr rank of each person? 
For example, I have 5 people their score are 10,10,9,8,4
I would like to see their rank as 1,1,3,4,5
Thank you so much!
2 REPLIES 2
v-diye-msft
Community Support
Community Support

Hi @xiumi_hou 

 

You need to refer to the RANKX function, please see: https://docs.microsoft.com/en-us/dax/rankx-function-dax 

 

Try below measure:

measure = RANKX(all(table),[Completed Cases],,DESC)

 

If it doesn't meet your requirement, please share your dummy pbix that I can look into it.

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
xiumi_hou
Post Partisan
Post Partisan

UP

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.