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.
Estimados colegas,
Estoy tratando de hacer que esta medida funcione durante los últimos días, pero parece estar por encima de mi cabeza. Probé muchas cosas explianed en otros lugares sobre medidas acumuladas, pero parece que mi caso es algo especial. Creo que me acercó bastante a la solución, pero no puedo conseguirla.
Necesito una MEDIDA para calcular el total acumulado de otra medida, como en el tabel a continuación:
Mi fórmula actual para la medida "Total Acumulado" es:
=
CALCULAR (
MAXX (
fDCA;
COUNTROWS ( FILTER ( fDCAs; fDCAs[Rev] <= EARLY ( fDCAs[Rev] ) ) )
);
USERELATIONSHIP ( dCalendar[Date]; fDCAs[Data Aprovação DCA] )
)
NOTA 1: Necesito una MEDIDA, y no una COLUMNA CALCULADA. Esto agrega un poco de complejidad al usar EARLIER, ya que necesita un contexto de fila anterior.
NOTA 2: La tabla tiene filtros en el campo FILTER y segmentaciones de datos con DATES.
NOTA 3: Para la medida de APROBACIÓN TOTAL tengo que utilizar una relación inactiva entre la tabla CALENDAR y la tabla de datos.
NOTA 4: En realidad estoy usando PowerPivot.
El archivo XLSX está disponible en el siguiente enlace.
Muchas gracias por la ayuda,
Solved! Go to Solution.
@anmattos Olvidé el TODO
Total Approval =
VAR __Rev = MAX('fDCA'[Rev])
VAR __Table =
ADDCOLUMNS(
DISTINCT(ALL('fDCA'[Rev])),
"__TotalApprovals",[Total Approvals]
)
RETURN
SUMX(FILTER(__Table,[Rev]<=__Rev),[__TotalApprovals])
@anmattos Probar:
Total Approval =
VAR __Rev = MAX('fDCA'[Rev])
VAR __Table =
ADDCOLUMNS(
DISTINCT('fDCA'[Rev]),
"__TotalApprovals",[Total Approvals]
)
RETURN
SUMX(FILTER(__Table,[Rev]<=__Rev),[__TotalApprovals])
Hola @Greg_Deckler ,
Muchas gracias por la solución propuesta. Desafortunadamente devolvió los mismos resultados que mi fórmula actual.
Saludos
@anmattos Olvidé el TODO
Total Approval =
VAR __Rev = MAX('fDCA'[Rev])
VAR __Table =
ADDCOLUMNS(
DISTINCT(ALL('fDCA'[Rev])),
"__TotalApprovals",[Total Approvals]
)
RETURN
SUMX(FILTER(__Table,[Rev]<=__Rev),[__TotalApprovals])
¡¡¡Uau!!!
¡Gracias @Greg_Deckler! ¡Funcionó! Ahora necesitaré más de 3 días para entenderlo, pero el problema está resuelto.
¡Muchas gracias por su tiempo!
@anmattos Aquí hay un recorrido:
Total Approval =
VAR __Rev = MAX('fDCA'[Rev]) // Get the current value of Rev column in the current row
VAR __Table =
ADDCOLUMNS(
DISTINCT('fDCA'[Rev]), // Since we are in a visual where there is a single value of Rev in context, override this and get all the values of the distinct values of Rev in a single column table.
"__TotalApprovals",[Total Approvals] // Add the measure to this single column table and the values returned are for the individual Rev values in the current virtual table row.
)
RETURN
SUMX(FILTER(__Table,[Rev]<=__Rev),[__TotalApprovals]) // SUM up the measure in our virtual table but filter the table such that only "previous" rows are summed.
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 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
1 |