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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Add + 1 to previous row

Hi All

 

I was able to create the "Cycle" column using this formular in MS Excel: =IF(A2=A1;IF(B2 = "Reboot";C1+1;C1+0);0). Basically, if the name in the current row matches the name in the previous row, the proceed but if not then 0. The formular proceeds to add 1 to subsequent tasks when TaskName  = Reboot. It's quite easy in Excel, but can it be done in Power BI? 

 

NameTaskNameCycle
MtsweniEnrol0
MtsweniInvite0
MtsweniReboot1
MtsweniConsult1
MtsweniReboot2
MtsweniRecord BC2
MtsweniRecord BC2
MtsweniFarewell2
MtsweniConsult2
MtsweniReboot3
MtsweniConsult3
MtsweniConsult3
ThabisoEnrol0
ThabisoInvite0
ThabisoSent Reminder0
ThabisoReboot1
ThabisoSend Materials1
ThabisoReboot2
ThabisoRecord BC2
ThabisoRecord BC2
ThabisoFarewell2
ThabisoConsult2
ThabisoReboot3
ThabisoConsult3
ThabisoConsult3
ThabisoComprehensive Diabetes Tests3
ThabisoSend Materials3
PaulEnrol0
PaulInvite0
PaulSend Materials0
PaulWelcome0
PaulReboot1
PaulRecord BC1
PaulReboot2
PaulRecord BC2
PaulRecord BC2
PaulFarewell2
PaulConsult2
PaulReboot3
PaulConsult3
PaulConsult3
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @thabz_mogale,

 

Please check following calculated column as below and see if it meet your exception:

 

Cycle =

CALCULATE (

    COUNTROWS ( 'Table' ),

    FILTER (

        'Table',

        'Table'[Name] = EARLIER ( 'Table'[Name] )

            && 'Table'[Index] <= EARLIER ( 'Table'[Index] )

            && 'Table'[TaskName] = "Reboot"

    )

) + 0

 

Result would be shown as below:

1.PNG

 

Best Regards,

Jay

 

Community Support Team _ Jay Wang

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

1 REPLY 1
Anonymous
Not applicable

Hi @thabz_mogale,

 

Please check following calculated column as below and see if it meet your exception:

 

Cycle =

CALCULATE (

    COUNTROWS ( 'Table' ),

    FILTER (

        'Table',

        'Table'[Name] = EARLIER ( 'Table'[Name] )

            && 'Table'[Index] <= EARLIER ( 'Table'[Index] )

            && 'Table'[TaskName] = "Reboot"

    )

) + 0

 

Result would be shown as below:

1.PNG

 

Best Regards,

Jay

 

Community Support Team _ Jay Wang

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

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors