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
Syndicate_Admin
Administrator
Administrator

importe de la última factura del año pasado

Tengo tabla tiene cliente y el importe de la factura y la fecha de la factura)

Cómo puedo obtener el importe de la última factura para el cliente del año pasado (según la fecha de la factura)

gracias

7 REPLIES 7
Syndicate_Admin
Administrator
Administrator

cualquiera puede ayudarme para este problema, por favor

Syndicate_Admin
Administrator
Administrator

@Ibrahimxix , En caso de que esté buscando este año vs el año pasado, puede usar una tabla de fechas e inteligencia de tiempo y tener medidas como

Ventas YTD = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Últimas ventas YTD = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))

ver por cliente y obtendrás

HI amitchandak

Seguí sus pasos, pero me enfrento a este problema

'pttffam8301100_all'[t_last]= [Fecha de invocación]

'pttffam8301100_all'[t_tkey]=cliente

acc1 = was _1 = max( 'pttffam8301100_all'[t_last])

var _max = maxx(filter(ALLSELECTED(pttffam8301100_all), 'pttffam8301100_all'[t_tkey] = max('pttffam8301100_all'[t_tkey]) && 'pttffam8301100_all'[t_last] <= eomonth(_1, -1* month(_1))),'pttffam8301100_all'[t_last]

devolución

sumx(filter(ALLSELECTED(pttffam8301100_all), 'pttffam8301100_all'[t_tkey] = max('pttffam8301100_all'[t_tkey]) && 'pttffam8301100_all'[t_last]+ _max), 'pttffam8301100_all'[t_last])

Ibrahimxix_2-1643107110396.png

@Ibrahimxix ,

Hay un error de sintaxis en el código. Dejaste fuera un ")" antes de 'regresar'.

@Ibrahimxix , Pruebe esto

acc1 = was _1 = max( 'pttffam8301100_all'[t_last])

var _max = maxx(filter(ALLSELECTED(pttffam8301100_all), 'pttffam8301100_all'[t_tkey] = max('pttffam8301100_all'[t_tkey]) && 'pttffam8301100_all'[t_last] <= eomonth(_1, -1* month(_1))),'pttffam8301100_all'[t_last])

devolución

sumx(filter(ALLSELECTED(pttffam8301100_all), 'pttffam8301100_all'[t_tkey] = max('pttffam8301100_all'[t_tkey]) && 'pttffam8301100_all'[t_last]= _max), 'pttffam8301100_all'[t_last])

¿Alguna actualización Sr. amitchandak?

querido amitchandak

El resultado que me apareció es una fecha, quiero el importe de la última factura

Ibrahimxix_0-1643109723403.png

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.