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
Boycie92
Resolver I
Resolver I

Segunda fecha última Total

Hola

Espero que alguien pueda ayudarme a tener una mesa muy simple.

Me gustaría poder crear una medida que proporcione la cifra (total) para la segunda última fecha disponible en mis datos. Por lo tanto, en este escenario 400. ¿Alguna idea?

Fecha Total

1/1/2020 100

2/1/2020 150

3/1/2020 400

4/1/2020 500

Gracias

Boycie92

4 REPLIES 4
amitchandak
Super User
Super User

@Boycie92

medida :
var _max maxx(allselected(Table),Table[date])
devolución
calculate(lastnonblankvalue(Table[date],Sum(Table[Total])),Table[Date]<_max)

O


medida :
var _max maxx(allselected(Table),Table[date])
devolución
calculate(lastnonblankvalue(Table[date],Sum(Table[Total])),filter(allselected(Table),Table[Date]<_max))

Hola @amitchandak

Eso funciona perfectamente gracias. ¿Hay de todos modos para mostrar la segunda fecha las como una medida separada?

Gracias

Boycie92

@Boycie92 , Crear una medida de la misma manera que la anterior y en ese uso

max(Table[Date]) en lugar de Sum(Table[Total])

Fowmy
Super User
Super User

@Boycie92

Por favor revise esta solución,

https://community.powerbi.com/t5/Desktop/Show-second-last-date-value-in-card/td-p/531093

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

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.