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
nmyre
Helper III
Helper III

Total de ejecución basado en la columna de la segunda tabla

Hola

Estoy tratando de producir un total de funcionamiento basado en 2 tablas. Ejemplo a continuación:

GL Transactions Table 1.jpg

GL Description Table 2.jpg

Están conectados por una relación en las columnas 'Cuenta GL' en ambas tablas. Estoy tratando de producir un total en ejecución utilizando la 'Fecha' (tabla 1) de la columna 'Importe' en la tabla 1 SI la Descripción de la cuenta GL (en la tabla 2) es UOO, AEU o AEP.

¿Alguna idea?

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hola @nmyre ,

Prueba esta medida :

RunningTotal = 
var RunningTotal_all = CALCULATE(
SUM( Sheet6[amount] ),
FILTER(  ALL(Sheet6) ,
SUMX( FILTER( Sheet6, EARLIER( Sheet6[date] ) <= Sheet6[date]&&EARLIER(Sheet6[GL Account])=Sheet6[GL Account]), Sheet6[amount] )
)
)
return IF(MAX(Sheet7[GL Description code])in {"AEU","UOO","AEP"},RunningTotal_all)

Ejemplo .pbix

Saludos
Liang
Si este post ayuda, entonces considera Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

View solution in original post

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hola @nmyre ,

Prueba esta medida :

RunningTotal = 
var RunningTotal_all = CALCULATE(
SUM( Sheet6[amount] ),
FILTER(  ALL(Sheet6) ,
SUMX( FILTER( Sheet6, EARLIER( Sheet6[date] ) <= Sheet6[date]&&EARLIER(Sheet6[GL Account])=Sheet6[GL Account]), Sheet6[amount] )
)
)
return IF(MAX(Sheet7[GL Description code])in {"AEU","UOO","AEP"},RunningTotal_all)

Ejemplo .pbix

Saludos
Liang
Si este post ayuda, entonces considera Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

Para crear un total en ejecución, necesita una columna numérica en el plan de cuentas que se pueda usar para ordenar el total en ejecución. Le sugiero que mire mi artículo y video aquí https://exceleratorbi.com.au/build-a-pl-with-power-bi/

cubrió todo lo necesario para construir un P&L



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

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.