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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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.LeanAndPractise(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.LeanAndPractise(Everyday)


)



sayaliredij
Super User
Super User

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
Super User
Super User

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.