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
PGAT
Helper III
Helper III

Mostrar estadísticas de X día o mes

Hola, tengo datos YTD en un gráfico. En la actualidad, los gráficos muestran los datos por sus meses. Filtraré los meses que han pasado a través del filtro visual. ¿Hay una manera automática de que los gráficos muestren decir, a partir del mes actual menos mes? I.e. Junio es el mes actual, y quiero que las estadísticas se muestren a partir de mayo de 2020.

Muchas gracias,

Patrick

3 REPLIES 3
amitchandak
Super User
Super User

@PGAT, mes muy claro para mí,

Supongamos que tiene Mes Año

Año del mes : Format([Fecha],"MMM-AAAA")

Crear una nueva columna como

Año del mes Nuevo : if([Fecha] >-Cambiar( Verdadero(),
eomonth([Date],0) > á eomonth(Today(),-1),"Last Month" ,
eomonth([Date],0) > áomonth(Today(),0),"This Month" ,
Format([Date],"MMM-AAAA")
)

Ordenarlo en

Mes Año orden - FORMAT([Fecha],"aaaamm")

Y filtrar el mes pasado, si es necesario el mes pasado y este mes

O tener medida como

MTD QTY forzado
var _max hoy()
var _min á minx(allselected('Date'),'Date'[Date])
devolución
calculate(Sum('order'[Qty]),filter(all('Date'),'Date'[Date]<-_max && 'Date'[Date]>-_min))

Hola Amitchandak, gracias por tomarse el tiempo. Lo intentaré.

Hola @PGAT ,

¿Tiene sentido la respuesta del amitchandak? Si funciona para usted, por favor acédle como solución. Si todavía necesita ayuda, comparta algunos datos de muestra y la salida esperada. Lo entenderemos claramente.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.