Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Estoy diseñando un informe que contiene una segmentación de datos de fecha. ¿Sería posible establecer automáticamente la fecha de inicio, en función de la fecha hasta la fecha? Por ejemplo, cuando el usuario selecciona el 29/06/2021 como fecha de finalización, me gustaría que el 01/01/2020 se estableciera automáticamente como fecha de inicio, sin la posibilidad de que el usuario cambie eso.
La lógica sería que la fecha de inicio siempre es el 1 de enero del año antes de la fecha de finalización seleccionada.
¡Gracias!
Hay @erikm ,
¿Puede esto satisfacer sus necesidades?
StartDate =
VAR SelectedDate_ =
SELECTEDVALUE ( Dates[Date] )
VAR StartDate_ =
DATE ( YEAR ( SelectedDate_ ) - 1, 1, 1 )
RETURN
StartDate_
Measure =
IF (
MAX ( 'Data Table'[Date] ) >= [StartDate]
&& MAX ( 'Data Table'[Date] ) <= SELECTEDVALUE ( Dates[Date] ),
1
)
Saludos
Icey
Si este post ayuda,entonces por favor considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
Hola @erikm
Puedes hacer algo como esto
Measure as filter =
VAR MonthsToLookBack = 10
VAR DataTableDate = MIN('Data Table'[Date])
VAR DateTableDate = MIN('Dates'[Date])
VAR DateAddAlternative = EDATE(DateTableDate,-MonthsToLookBack)
RETURN
IF(
(DataTableDate < DateTableDate) &&
(DataTableDate > DateAddAlternative) ,
-- FLAG IF TRUE --
1
)
Si pudiera enviar .pbix de muestra que demuestren lo que está buscando obtener. Realmente ayudaría a proporcionarle una solución implementada rápida.
Espero que esto ayude
saludos
Kumail Raza
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.