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

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.

Reply
Anonymous
Not applicable

El promedio rodante de la medida rápida muestra fechas futuras

¿Cómo puedo hacer para desaparecer con los meses resaltados como se muestra a continuación?

No necesito las fechas futuras (oct a dec 2020).

avg_time.PNG

Mi DAX para la medida utilizada en este eje:

Recuento de eventos 6 MO
SI(
ISFILTERED('tb_aog'[INICIO]),
ERROR("Las medidas rápidas de inteligencia de tiempo solo se pueden agrupar o filtrar por la jerarquía de fechas proporcionada por Power BI o la columna de fecha principal."),
VAR __LAST_DATE = ENDOFMONTH('tb_aog'[INICIO].[ Date])
VAR __DATE_PERIOD ?
FECHAS ENTRE FIN(
'tb_aog'[INICIO]. [Date],
STARTOFMONTH(DATEADD(__LAST_DATE, -5, MES)),
ENDOFMONTH(DATEADD(__LAST_DATE, 0, MES))
)
devolución
SI (
YEAR ( __LAST_DATE ) IN ALLSELECTED ( tb_aog[INICIO].[ Year] ),
AVERAGEX(
CALCULATETABLE(
RESUMEN(
VALUES('tb_aog'),
'tb_aog'[INICIO]. [Year],
'tb_aog'[INICIO]. [QuarterNo],
'tb_aog'[INICIO]. [Quarter],
'tb_aog'[INICIO]. [MonthNo],
'tb_aog'[INICIO]. [Month]
),
__DATE_PERIOD
),
CALCULATE([Count of events], ALL('tb_aog'[INICIO].[ Día]))
)
))

Gracias de antemano.

Marcos

2 ACCEPTED SOLUTIONS

@marcospaula - Use MIN en lugar de MAX


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

@marcospaula, otra salida es

si (tb_aog'[INICIO].[ Fecha) - Eomonth (hoy()-1, blank(),

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

¡¡Gran!! Gracias @amitchandak y @Greg_Deckler por su atención en este asunto. Super helpful!!

¡Tengan un gran día!

Anonymous
Not applicable

¡¡Gran!! Me salvó el día!! Fijo

@marcospaula, otra salida es

si (tb_aog'[INICIO].[ Fecha) - Eomonth (hoy()-1, blank(),

Anonymous
Not applicable

Perfecto, pero el sep 2020 desapareció.

avg.PNG

@marcospaula - Use MIN en lugar de MAX


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

@marcospaula , Suponiendo 'tb_aog'[INICIO]. [Fecha] se utiliza en el eje. otra cosa utilizar la fecha en el eje

Tratar

Count of events 6 MO =
if( max('tb_aog'[INICIO].[ Date]) >= today(), blank(),
IF(
ISFILTERED('tb_aog'[INICIO]),
ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."),
VAR __LAST_DATE = ENDOFMONTH('tb_aog'[INICIO].[ Date])
VAR __DATE_PERIOD =
DATESBETWEEN(
'tb_aog'[INICIO].[ Date],
STARTOFMONTH(DATEADD(__LAST_DATE, -5, MONTH)),
ENDOFMONTH(DATEADD(__LAST_DATE, 0, MONTH))
)
RETURN
IF (
YEAR ( __LAST_DATE ) IN ALLSELECTED ( tb_aog[INICIO].[ Year] ),
AVERAGEX(
CALCULATETABLE(
SUMMARIZE(
VALUES('tb_aog'),
'tb_aog'[INICIO].[ Year],
'tb_aog'[INICIO].[ QuarterNo],
'tb_aog'[INICIO].[ Quarter],
'tb_aog'[INICIO].[ MonthNo],
'tb_aog'[INICIO].[ Month]
),
__DATE_PERIOD
),
CALCULATE([Count of events], ALL('tb_aog'[INICIO].[ Day]))
)
)) )

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.