cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
nuriac
Helper III
Helper III

Targeta con Valores

Hola, 

 

tengo una tabla con una columna que tiene una medida calculada; y quiero generar otra tabla donde aparezca el total de esa medida. No entiendo porque no me sale.

 

Adjunto pbix.

Hoja Pedidos VTA; medida:

VTA1 = SUMX ( SUMMARIZE ( 'PEDIDOS DE VENTA', 'PEDIDOS DE VENTA'[Nº Pedido de Venta], 'PEDIDOS DE VENTA'[Nombre Cliente], 'PEDIDOS DE VENTA'[FEcha de Envío Confirmada] ), [Fact Prevista Pedido] * [INC_VTA_MES1])
 
Hoja Total.
una tabla donde poder sumar los valores de las medidas VTA1; Mes+1
 
4 REPLIES 4
mahoneypat
Microsoft
Microsoft

Miré tu pbix. La razón por la que la medida no funciona en un objeto visual de tarjeta es que la medida incluye la referencia a una medida RANKX que no obtendrá un resultado en el contexto (por ejemplo, el objeto visual no tiene el número de cliente).

Miré una de las medidas a las que se hace referencia en su medida principal y proporcioné a continuación una manera mucho más eficiente de escribirla. No miré el enfoque general, pero esta medida debería escribirse así.

INC_VTA_MES1 Nuevo ( New)
SWITCH (
AVERAGEX (
«MEDIDAS SOLICITADAS»,
[Rango PED]
),
1, SELECTEDVALUE ( PEDIDO_1_MES_1[Valor] ),
2, SELECTEDVALUE ( PEDIDO_2_MES_1[Valor] ),
3, SELECTEDVALUE ( PEDIDO_3_MES_1[Valor] ),
4, SELECTEDVALUE ( PEDIDO_4_MES_1[Valor] ),
5, SELECTEDVALUE ( PEDIDO_5_MES_1[Valor] ),
0
)

saludos

palmadita





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


@mahoneypat  he cambiado la fómula para que sea más eficiente. Gracias

Como puedo hacer para poner la medida VTA1 en una tabla de otra hoja y que me de el mismo valor? no funciona.

https://drive.google.com/file/d/1wcjIvxpX4UYDb4SL6AEhNwNDtFpsSaQ0/view?usp=sharing

 

This is an example of how to write a measure expression to simulate that table visual all in one measure.  It uses a SUMMARIZE using the same columns, and then it calculates the VTA1 measure for each row, then sums it all up and should give the same result.  You will need to add any of the same visual or page filters from that table to match.

 

NewMeasure =
SUMX (
    SUMMARIZE (
        'PEDIDOS DE VENTA',
        'PEDIDOS DE VENTA'[Nº Pedido de Venta],
        'PEDIDOS DE VENTA'[Nombre Cliente],
        'PEDIDOS DE VENTA'[FEcha de Envío Confirmada]
    ),
    [VTA1]
)

 

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


@mahoneypat  no funciona.

si añado esa medida en la hoja donde tengo los demás calculos si funciona, pero cuando añado la medida en una tabla de otra hoja (en la hoja TOTAL); me da valores 0.

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors