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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
teixidor
Frequent Visitor

% proporcional a las lineas

Tengo una tabla de lineas de pedidos de venta y necesito una formula para el calculo de la columna de %, quer es el resultado de dividir 100 por el numero de lineas del pedido. Si tiene una linea es 100%, si tiene 2 el 50%, etc...


VENTAS
NºPedido   linea   Importe      %
1                   1        10         33,33
1                   2        34         33,33
1                   3        67          33,33
2                    1       32           50
2                    2       23           50
3                    1       15           100
4                    1        24          25
4                   2         34          25
4                   3         5            25
4                   4         6           25

 

Gracias

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

@Syndicate_Admin , Una nueva columna

% cada línea

1/Countx(filter(Table, [No] = earlier([No]) ), [No])

Importe %

divide([Cantidad],sumx(filter(Tabla, [No] = anterior([No]) ), [Cantidad]) )

View solution in original post

1 REPLY 1
Syndicate_Admin
Administrator
Administrator

@Syndicate_Admin , Una nueva columna

% cada línea

1/Countx(filter(Table, [No] = earlier([No]) ), [No])

Importe %

divide([Cantidad],sumx(filter(Tabla, [No] = anterior([No]) ), [Cantidad]) )

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.