Forum Discussion
Lastdate
Hola a todos. Soy nueva en Power BI. Tengo un problema con las fechas. Cuando armo una medida y utilizo la función “lastdate” de una columna que contiene varias fechas funciona correctamente y me trae la última fecha de la segemtacion de datos seleccionada
Cuando quiero usar esa misma función (lastadate) dentro de una fórmula para la tabla me devuelve la misma fecha que tiene la fila, no me relaciona con la ultima fecha de la segmentacion.
Lo que necesito es una columna que tenga para todas las filas la última fecha de la segmentación de datos seleccionada.
Cuando quiero márcalo como fecha dice que necesita valores únicos.
Alguna idea de que errores estare cometiendo?
Muchas gracias
18 Replies
- AhmedxSuper User
pls try his
LastDate = CALCULATE(LASTDATE('Table'[Date]),REMOVEFILTERS())- locarizFrequent Visitor
Hola, gracias por su respuesta. Primero pedir disculpas por escribir en español, quizás estoy en el foro incorrecto.
Con mi informe, usando la formula sugerida me trae en mi tabla la ultima fecha de la columna "fecha" sin importar la segmentación de datos que haga en la página.
Necesito que traiga en una columna de la tabla para todas las filas la ultima fecha del rango que queda seleccionado en la segmentacion de datos, es para poder aplicar un índice y ajustar por inflación según la segmentación elegida.
La unica manera que pude lograrlo es poniendo la fecha a mano con una fucion "date" (2023,01,31) como en el ejemplo adjunto.
Tendremos algun problema con el formato?
Muchas gracias por su ayuda
- AhmedxSuper User
I don't really understand what you want
but try thisLastDate = CALCULATE(EOMONTH(MAX('Table'[Date]),0),REMOVEFILTERS())
- AnonymousNot applicable
Hi locariz ,
Based on the information you have provided, I have created a simple example to solve this problem. A date can be manually entered on the page (or selected from a list) and then the date corresponds to a column in Table 1, and you can follow the steps below:
1.Add new measure.total = CALCULATE ( [month total sales] * SELECTEDVALUE ( Table2[amount] ), FILTER ( 'Table', 'Table'[Date] = SELECTEDVALUE ( Table2[date1] ) ) )fianl output:
How to Get Your Question Answered Quickly - Microsoft Fabric Community
If it does not help, please provide more details with your desired out put and pbix file without privacy information.
Best Regards,
Ada Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- locarizFrequent Visitor
Dear Ada, thank you very much for your answer.
While trying to follow the steps you had proposed, we managed to include a measure (measure 3) on the page showing different values while changing the selection (based on table 3). However, when we try for example to multiply by measure 3 in another table, this does not work, as if it wasn't a real value. Do you have any idea how to solve this? Thanks again for all your help.
- AnonymousNot applicable
Hi locariz ,
Are you having trouble multiplying columns and metrics? I created an example, you can create a Measure:Measure = SELECTEDVALUE(Table3[Amount])*[Total Amount]How to Get Your Question Answered Quickly - Microsoft Fabric Community
If it does not help, please provide more details with your desired out put and pbix file without privacy information.
Best Regards,
Ada Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.