Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowHola a todos, Esto está funcionando:
Promedio pagado =
Var PaidAvg =
AVERAGEX (
CALCULABLE (
RESUMIR (
FILTER ('Transacciones', 'Transacciones'[isRowFilter] = 1),
'Transacciones'[Mes],
"TotalPaid", DISTINCTCOUNT ('Transacciones'[Grupo])
),
ALL ('Transacciones'[LineItem]),
ALL ('Calendario'[MonthYearLong]),
USERELATIONSHIP ('Calendario'[Fecha], 'Transacciones'[Fecha de cierre])
),
[TotalPaid]
)
DEVOLUCIÓN PaidAvg
Sin embargo
Var PaidAvg =
AVERAGEX (
CALCULABLE (
RESUMIR (
FILTER ('Transacciones', 'Transacciones'[isRowFilter] = 1),
'Transacciones'[Mes],
"TotalPaid", DISTINCTCOUNT('Transacciones'[Grupo])
),
[TotalPaid]<>0,
ALL ('Transacciones'[LineItem]),
ALL ('Calendario'[MonthYearLong]),
USERELATIONSHIP ('Calendario'[Fecha], 'Transacciones'[Fecha de cierre])
),
[TotalPaid]
)
DEVOLUCIÓN PaidAvg
me da el error:
No se puede determinar el valor de 'TotalPaid'. O bien la columna no existe, o no hay ninguna fila actual para esta columna.
No quiero contar el Grupo si el Total de Pagados es 0 para ese grupo.
¿Cómo agrego el filtro de nivel superior?
Solved! Go to Solution.
Gracias, he modificado tu código y esto funciona:
Promedio pagado =
AVERAGEX ( FILTRO (
CALCULABLE (
RESUMIR (
FILTER ( 'Transacciones', 'Transacciones'[isRowFilter] = 1 ),
'Transacciones'[Mes],
"TotalPaid", DISTINCTCOUNT ( 'Transacciones'[Grupo] )
),
ALL ( 'Transacciones'[LineItem] ),
ALL ( 'Calendario'[MonthYearLong] ),
USERELATIONSHIP ( 'Calendario'[Fecha], 'Transacciones'[Fecha de cierre] )
),
[TotalPaid] <> 0 ), [TotalPaid] )
DEVOLUCIÓN
PaidAvg
Por favor, actualice la fórmula de su medida [Promedio pagado] como se muestra a continuación y verifique si eso es lo que desea ...
Promedio pagado = VAR _tab = CALCULABLE ( RESUMIR ( FILTER ( 'Transacciones', 'Transacciones'[isRowFilter] = 1 ), 'Transacciones'[Mes], "TotalPaid", DISTINCTCOUNT ( 'Transacciones'[Grupo] ) ), ALL ( 'Transacciones'[LineItem] ), ALL ( 'Calendario'[MonthYearLong] ), USERELATIONSHIP ( 'Calendario'[Fecha], 'Transacciones'[Fecha de cierre] ) ) VAR PaidAvg = AVERAGEX ( FILTER ( _tab, [TotalPaid] > 0 ), [TotalPaid] ) DEVOLUCIÓN PaidAvg |
Si lo anterior no puede ayudarlo a obtener el resultado deseado, proporcione algunos datos de muestra en su tabla transacciones (excluir datos confidenciales) con formato de texto y su resultado esperado con lógica de backend y ejemplos especiales. Es mejor si puede compartir un archivo pbix simplificado. Puede consultar el siguiente enlace para cargar el archivo a la comunidad. Gracias.
Cómo subir PBI en la comunidad
Saludos
Gracias, he modificado tu código y esto funciona:
Promedio pagado =
AVERAGEX ( FILTRO (
CALCULABLE (
RESUMIR (
FILTER ( 'Transacciones', 'Transacciones'[isRowFilter] = 1 ),
'Transacciones'[Mes],
"TotalPaid", DISTINCTCOUNT ( 'Transacciones'[Grupo] )
),
ALL ( 'Transacciones'[LineItem] ),
ALL ( 'Calendario'[MonthYearLong] ),
USERELATIONSHIP ( 'Calendario'[Fecha], 'Transacciones'[Fecha de cierre] )
),
[TotalPaid] <> 0 ), [TotalPaid] )
DEVOLUCIÓN
PaidAvg
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!