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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
DCKarol1999
Frequent Visitor

Numeración de filas por Programa

Buen dia,

Quisiera su apoyo para enumerar las filas segun programa, el programa (D) NUTRISSA-MD se repite "n" veces se enumera de manera ascendiente en la fecha 10/01/2021 debe iniciar el 1 al n  y la fecha11/01/2021debe iniciar del 1 al n, asi los demas programas.

 

Fecha ProgramaNumeración según Programa
10/01/2021(D) NUTRISSA-MD1
10/01/2021(D) NUTRISSA-MD2
10/01/2021(D) NUTRISSA-MD3
10/01/2021(D) LA RICA VICKY-MD1
10/01/2021(D) LA RICA VICKY-MD2
10/01/2021(D) LA RICA VICKY-MD3
10/01/2021(D) LA RICA VICKY-MD4
10/01/2021(D) LA RICA VICKY-MD5
10/01/2021(D) LA RICA VICKY-MD6
10/01/2021(D) LN DESPIERTA CON MATINAL-MD1
10/01/2021(D) LN DESPIERTA CON MATINAL-MD2
10/01/2021(D) LN DESPIERTA CON MATINAL-MD3
10/01/2021(D) LN DESPIERTA CON MATINAL-MD4
11/01/2021 (D) NUTRISSA-MD1
11/01/2021 (D) NUTRISSA-MD2
11/01/2021 (D) NUTRISSA-MD3
11/01/2021(D) LN DESPIERTA CON MATINAL-MD1
11/01/2021(D) YO SOY-NO1
1 ACCEPTED SOLUTION
v-chenwuz-msft
Community Support
Community Support

Hi @DCKarol1999 ,

 

Inorder to do this, you should add an index column in the table. i recommand do it by power query editor.

vchenwuzmsft_0-1642044079689.png

Then create a columns via this following code:

Numeración según Programa =
COUNTROWS(
    FILTER(
        'Table',
        [Fecha ] = EARLIER( 'Table'[Fecha ] )
            && [Programa] = EARLIER( 'Table'[Programa] )
            && [Index] <= EARLIER( 'Table'[Index] )
    )
)

Result:

vchenwuzmsft_1-1642044340348.png

 

Best Regards

Community Support Team _ chenwu zhu

 

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

2 REPLIES 2
v-chenwuz-msft
Community Support
Community Support

Hi @DCKarol1999 ,

 

Inorder to do this, you should add an index column in the table. i recommand do it by power query editor.

vchenwuzmsft_0-1642044079689.png

Then create a columns via this following code:

Numeración según Programa =
COUNTROWS(
    FILTER(
        'Table',
        [Fecha ] = EARLIER( 'Table'[Fecha ] )
            && [Programa] = EARLIER( 'Table'[Programa] )
            && [Index] <= EARLIER( 'Table'[Index] )
    )
)

Result:

vchenwuzmsft_1-1642044340348.png

 

Best Regards

Community Support Team _ chenwu zhu

 

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

 

 

amitchandak
Super User
Super User

@DCKarol1999 , Try a new table like, in case calendar generate name fecha, make sure you have a different name in you table

 filter(GENERATE(data1, calendar(eomonth(min(data1[Fecha ]),-1)+1,eomonth(max(data1[Fecha ]),0))), [Date] >= EOMONTH([Fecha ],-1)+1 && [Date] <=[Fecha ])

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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