Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Syndicate_Admin
Administrator
Administrator

Necesita ayuda con la funcionalidad de inteligencia de tiempo

Hola

Estoy creando una medida a través de la cual cualquier rango de fechas que se esté seleccionando en el filtro de fechas obtenga el año máximo para él y calcule el gasto para ese año para todos los Qtr de los cuales los datos están presentes.

Por favor, revise la siguiente medida que he creado y adjuntar y por favor sugiera el camino a seguir para ello. Necesito el gasto total para el año máximo sin tener en cuenta la fecha seleccionada en el filtro.

MaxyearAmount =

DÓNDE MAXyear =

CALCULAR( AÑO( MÁXIMO( 'Fecha'[DateValue] ) ), TODOSSELECCIONADOS() )

DÓNDE MinDate_MaxYear =

CALCULAR(

MIN( 'Fecha'[DateValue].[Año] ),

FILTRO( 'Fecha', 'Fecha'[Año] = MAXyear )

)

DÓNDE MaxDate_MaxYear =

CALCULAR(

MÁXIMO( 'Fecha'[DateValue].[Año] ),

FILTRO( 'Fecha', 'Fecha'[Año] = MAXyear )

)

DÓNDE MaxyearAmount =

CALCULAR(

[Gastar],

FILTRO(

'Fecha',

'Fecha'[DateValue].[Año] >= MinDate_MaxYear

&& 'Fecha'[DateValue].[Año] <= MaxDate_MaxYear

)

)

DEVOLUCIÓN
MaxyearAmount
Query.jpg
2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

En ella, @laraibashfaq

Prueba algo como:

MaxyearAmount =
VAR MaxYear =
CALCULAR (
MAX ( 'Date'[DateValue] ),
ALLEXCEPT ( 'Date', 'Date'[DateValue] )
)
DEVOLUCIÓN
CALCULAR (
MAX ( [Gastar] ),
FILTRO (
ALLEXCEPT ( 'Date', 'Date'[DateValue] ),
'Date'[DateValue] = MaxYear
)
)

Nops, esta función no funciona

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors