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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Anonymous
Not applicable

How to Rank in a column

Hi 

I have a column hirearchy, and a list of customer ID, Now customers can have only 1 unique ID associated with it, but the column has values like for example 

1. RLE 

2. Treatment 

3. Surgery

4. LRI 

and so on.. 

 

the column hirearchy is based on the fact that if a customer buys 2 RLE i need to count only 1, that was easy with distinctcount, and i managed to do it. BUT now it seems customer can buy and RLE, a TREATMENT and then SURGERY then I need to count 1 and that customer as an RLE Customer. 

if, suppose a customer gets an LRI and then a TREATMENT, then i need to count The customer as a TREATMENT customer.. in this list whatever comes on top, that instance should be counted.. DO ANYONE HAS ANY IDEA HOW I CAN APPROACH THIS ?? YOUR COMMENTS WILL BE VALUABLE  

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I have found the solution, there was a previous question that is similar to what i want.. posting it here to close this thread :

 

https://community.powerbi.com/t5/Desktop/How-to-Find-Column-s-Minimum-value-based-on-other-columns-g...

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

I have found the solution, there was a previous question that is similar to what i want.. posting it here to close this thread :

 

https://community.powerbi.com/t5/Desktop/How-to-Find-Column-s-Minimum-value-based-on-other-columns-g...

v-cgao-msft
Community Support
Community Support

Hi @Anonymous ,

 

Not very clear, Why the output of OTHERS is 2, but the output of SBK is 1?

vcgaomsft_0-1651721218718.png

It makes it easier to give you a solution.

  1. Sample (dummy dataset) data as text, use the table tool in the editing bar
  2. Expected output from sample data
  3. Explanation in words of how to get from 1. to 2.

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

Best Regards,
Community Support Team Gao

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems with it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

Anonymous
Not applicable

the grouping has to be done based on customer ID 

so if you look at others there are two customers who have others ( cid 1 and 4 )

there are 6 customers who has RLE as the minimum Hierarchy (2,3,5,6,7,9)

there is 1 customer who has sbk ( 8 ) 

Anonymous
Not applicable

as100_0-1651324020236.png

@PattemManohar  Iam expecting a matrix as an output in powerbi.. Like the screenshot above

PattemManohar
Community Champion
Community Champion

@Anonymous Can you put what's your expected output would look like ?





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




Anonymous
Not applicable

To explain further

 

as100_0-1651304748020.png

the hierarchy should be only counted once, ie for cid 1= count should be 1 and as others 
IF you look at cid 6, count should again be 1 but for RLE ..I hope you can understand this 

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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