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.
Hola Comunidad PowerBI.
He estado luchando con algo y agradecería algo de ayuda. Tengo una tabla con un conjunto de presupuestos y cifras de gastos reales por proyecto por mes. Estos se han incorporado a PowerBI. Ahora quiero calcular las cifras acumuladas / YTD para cada proyecto.
En la siguiente tabla tengo un ejemplo simplificado:
| del proyecto Tipo | Mes | Cantidad || ¡Lo que quiero!
| azul | presupuestaria Ene 22 | US$ 50 || US$ 50
| azul | presupuestaria Feb 22 | US$ 50 || US$ 100
| azul | presupuestaria mar 22 | US$ 50 || US$ 150
| azul | presupuestaria abr 22 | US$ 50 || US$ 200
| azul | actual Ene 22 | US$ 40 || US$ 40
| azul | actual Feb 22 | US$ 65 || US$ 105
| azul | actual mar 22 | US$ 35 || US$ 140
| azul | actual abr 22 | US$ 40 || US$ 180
| rojo | presupuestaria Ene 22 | US$ 30 || US$ 30
| rojo | presupuestaria Feb 22 | US$ 30 || US$ 60
| rojo | presupuestaria mar 22 | US$ 30 || US$ 90
| rojo | presupuestaria abr 22 | US$ 30 || US$ 120
| rojo | actual Ene 22 | US$ 20 || US$ 20
| rojo | actual Feb 22 | US$ 25 || US$ 45
| rojo | actual mar 22 | US$ 45 || US$ 90
| rojo | actual abr 22 | US$ 32 || US$ 122
Puedo agregar una columna calculada usando lo siguiente:
Acumulativo = CALCULATE(SUM(MyTable[Amount]0, All(MyTable), MyTable[Month] <= EARLIER(MyTable[Month]))
Esto crea la columna, pero suma el valor para ambos / todos los proyectos.
¿Cómo obtengo el cálculo para filtrar el proyecto Y el tipo? La última columna de arriba muestra lo que estoy tratando de lograr.
por favor use
Cumulative =
VAR CuttentMonth = MyTable[Month]
RETURN
CALCULATE (
SUM ( MyTable[Amount] ),
ALLEXCEPT ( MyTable, MyTable[Project] ),
MyTable[Month] <= CuttentMonth
)
Hola @tamerj1
Gracias.
He intentado esto. Obtengo valores acumulativos calculados, divididos por proyecto pero no (todavía) por tipo. ¿Es necesario añadir algo para lograrlo?
Por favor, utilice
Cumulative =
VAR CuttentMonth = MyTable[Month]
RETURN
CALCULATE (
SUM ( MyTable[Amount] ),
ALLEXCEPT ( MyTable, MyTable[Project], MyTable[Type] ),
MyTable[Month] <= CuttentMonth
)
MUCHAS GRACIAS. ¡Eso funciona de maravilla! Muy apreciado.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
1 |