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

Problema con medida rápida para el total de ejecución

Creé una medida rápida para mostrar el total de carrera por mes, comparando este año con el año pasado. La medida funciona bien, excepto que está mostrando resultados en el futuro para el año en curso. Necesito que se detenga con el mes actual y he intentado filtrar sin obtener los resultados correctos.

Aquí está la medida rápida:

Total de ejecución de SPEND en Mes ?
CALCULAR(
SUM('TABLE1'[SPEND]),
FILTRO (
CALCULATETABLE(
RESUMIR(
'TABLE1',
'TABLE1'[INV_DATE]. [MonthNo],
'TABLE1'[INV_DATE]. [Mes]
),
ALLSELECTED('TABLE1')
),
ISONORAFTER(
'TABLE1'[INV_DATE]. [MonthNo], MAX('TABLE1'[INV_DATE].[ MonthNo]), DESC,
'TABLE1'[INV_DATE]. [Mes], MAX('TABLE1'[INV_DATE].[ Mes]), DESC
)
)
)

Cualquier sugerencia sería apreciada. Gracias.

1 REPLY 1
amitchandak
Super User
Super User

Trate de usar YTD para acumulativo como

YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(('Date'[Date]),"12/31"),'Date'[Date]<=today()) //change end date of year//stop at today


YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(('Date'[Date]),"12/31")) //change end date of year
This Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD((ENDOFYEAR('Date'[Date])),"12/31")) //change end date of year

Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31")) //change end date of year
Last YTD complete Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year)),"12/31")) //change end date of year

Para obtener lo mejor de la función de inteligencia de tiempo. Asegúrese de que tiene un calendario de fechas y se ha marcado como la fecha en la vista de modelo. Además, únase a él con la columna de fecha de su hecho/s. Consulte:
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

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.