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

Necesita ayuda experta en DAX

Tengo una columna calculada calculando el número restante de días que una persona tiene para la licencia (Permiso restante).
Datos de muestra:
ID Leave Dates Remaining Leave

1 1/2/2020 20.5

1 2/3/2020 25.5

1 2/5/2020 30.5

1 2/6/2020 25.5

Una vez que filtré por mes de 2020 para abril. La tarjeta de visualización mostrará En blanco porque no tiene ningún registro para esta persona. En lugar de mostrar en blanco, quiero mostrar el último registro para esta persona que es del mes anterior 25,5. Nota: Son una gran cantidad de ID en estos datasets con sus propios conjuntos de fechas. Gracias

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Ramzy15

measure - lastnonblankvalue(Table[Leave Dates],max(Table[Remaining Leave]))

o así. Suponiendo que la fecha se une con el calendario de fechas

medida :
var _max á maxx(allselected(Date), Date[Date])
devolución
calculate(lastnonblankvalue(Table[Leave Dates],max(Table[Remaining Leave])) , filter(all(Date), Date[Date]<-_max))

View solution in original post

2 REPLIES 2
V-pazhen-msft
Community Support
Community Support

@Ramzy15
Intente crear esta medida:

Measure = CALCULATE(MIN([Remaining Leave]),ALLEXCEPT('Table','Table'[ID]),FILTER('Table',[Leave date]=CALCULATE(MAX([Leave date]),ALLEXCEPT('Table','Table'[ID]))))

Paul Zheng _ Equipo de apoyo de la comunidad
Si este post ayuda, entonces considera Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

amitchandak
Super User
Super User

@Ramzy15

measure - lastnonblankvalue(Table[Leave Dates],max(Table[Remaining Leave]))

o así. Suponiendo que la fecha se une con el calendario de fechas

medida :
var _max á maxx(allselected(Date), Date[Date])
devolución
calculate(lastnonblankvalue(Table[Leave Dates],max(Table[Remaining Leave])) , filter(all(Date), Date[Date]<-_max))

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.