cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors