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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
rainchong7401
Helper III
Helper III

How to Rank without the same ID

Hi Friends,
How do I do ranking within the same vouchers & find the latest accountnum I have.
As expected output shown in the picture.
I want to do it in "Data" add column and add it in.
Kindly assist me and provide code if can.
Really thank you.

rainchong7401_0-1667200172801.png

rainchong7401_2-1667200431947.png

 

 

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please try something like below.

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_0-1667202570367.png

 

 

Rank CC =
RANKX (
    FILTER ( Data, Data[Voucher] = EARLIER ( Data[Voucher] ) ),
    Data[AccountNum],
    ,
    DESC
)

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi,

Please try something like below.

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_0-1667202570367.png

 

 

Rank CC =
RANKX (
    FILTER ( Data, Data[Voucher] = EARLIER ( Data[Voucher] ) ),
    Data[AccountNum],
    ,
    DESC
)

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Kamsahamnida hyung. 
Really appreacited your respond.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.