Forum Discussion
Convert Rank to Customer Count
Hello.
I've been trying to figure out how many customers are buying X% of our products.
In my work in progress file (linked below), I've figured out those customers that purchased 25% of our products are ranked 1 thru 37. However, because there are ties, there's actually 41 customers in this cohort. But, I don't know how to write a DAX that shows 41 instead of 37.
So, because I figured out the rank, I need either a DAX that can:
1) Calculate N customers less than or equal to X% of total
or
2) Calcualte N customers at less than or equal to Y rank including ties
Thanks!
Figured it out. Actually it wasn't that hard:
9 Replies
- lbendlinSuper User
Any particular reason for not using PERCENTILEX for this?
- etaneHelper V
Yup. I never even heard of that function before....
- lbendlinSuper User
I would recommend starting with that PERCENTILEX.INC function (DAX) - DAX | Microsoft Learn - it will make your request much easier to implement.
- etaneHelper V
Figured it out. Actually it wasn't that hard: