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
AnkurSharma
Helper I
Helper I

Conditional Sequence

Hi ,
Need help .I have Part # column in Power bi which has Part #  in it. 
I want to create the custom column  , which checks if the current "Part#" is different from the "Part#" in the previous row. If it is different, it starts a new sequence with 1; otherwise, it continues the sequence by incrementing the previous index.

Please share Pbix. Thanks for helping. Appriciate your effort.

SequencePart#
13856
12345
22345
32345
11234
21234

 

1 ACCEPTED SOLUTION
ThxAlot
Super User
Super User

ThxAlot_0-1706740847180.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



View solution in original post

4 REPLIES 4
ThxAlot
Super User
Super User

ThxAlot_0-1706740847180.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



sayaliredij
Solution Sage
Solution Sage

Hi @AnkurSharma ,

 

Please refer the steps from following article. I tried it and it works

https://www.analytics-tuts.com/ranking-by-groups-using-power-query-in-power-bi/

Thanks and Regards,

 

Sayali

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful!! 

 





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

Proud to be a Super User!




sayaliredij
Solution Sage
Solution Sage

HI @AnkurSharma ,

 

Please try following measure to create calculated column

 

Rankin = 

RANKX(FILTER('Table','Table'[Part#] = EARLIER('Table'[Part#])),'Table'[Sequence],,ASC,DENSE)

 

Thanks and Regards,


Sayali


Please mark the question solved when done and consider giving a thumbs up if posts are helpful!! 

 




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

Proud to be a Super User!




I want to create this in Transform data so that i can make unique  column by combining Part# and sequence,

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.