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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Generate number series based on other column number first number change

I want Generate Number based on ther other column first number 1 chanage . attached sample input Data for reference 

 

Table 

task  task number
dd         1
ww        2
qw        3
ty         4
yu        5

 

if Number 1 changed to 2 order output look like

task task number calcaulted column
dd             2               2
ww           2                3
qw           3                4
ty          4                   5
yu        5                    6


if Number 1 changed to 3 order output look like

task task number calcaulted column
dd         3                       3
ww       2                        4
qw      3                        5
ty       4                        6
yu       5                        7

if Number 1 changed to 4 order output look like

task      task number       calcaulted column
dd           4                             4
ww          2                             5
qw         3                              6
ty          4                              7
yu        5                              8.

 

 

attached Sample Data Sample  

 
Thanks in advance . Looking For support
 
1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

You can try the following methods.

Column = 
Var _first=CALCULATE(MAX('Table'[task number]),FILTER('Table',[Index]=1))
Return
IF([Index]=1,[task number],CALCULATE(COUNT('Table'[task]),FILTER('Table',[Index]<EARLIER('Table'[Index])))+_first)

vzhangti_0-1699259217560.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

You can try the following methods.

Column = 
Var _first=CALCULATE(MAX('Table'[task number]),FILTER('Table',[Index]=1))
Return
IF([Index]=1,[task number],CALCULATE(COUNT('Table'[task]),FILTER('Table',[Index]<EARLIER('Table'[Index])))+_first)

vzhangti_0-1699259217560.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

wdx223_Daniel
Super User
Super User

CalculatedColumn=VAR _start=MAXX(TOPN(Table,Table[task],ASC),Table[task number]) RETURN COUNTROWS(FILTER(Table,Table[task]<EARLIER(Table[task])))+_start

Anonymous
Not applicable

 I got Error  cannot  find the type  task priority                                                                                                               

THENNA_41_0-1698978903066.png

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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