Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
locariz
Frequent Visitor

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 18
Anonymous
Not 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:

vyifanwmsft_0-1706584725800.png

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.

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.measure 3.jpgmeasure 3 version 2.jpgtable 2.jpg

Anonymous
Not 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.

Dear Ada

 

We would like  VENTA AJUSTADA in table 1 to be equal to venta*Indice (from table 2 ) depending on the selection in Column 1. The whole column venta multiplied by the same value of the selection. If we choose Indice2022-08, it would be the whole column venta * 911,13.

Could you please tell me how to upload a pbix file?  I could not do it.

 

Thanks in advancenew image 31-01.jpeg

Anonymous
Not applicable

Hi @locariz ,

You can put your files in a dropbox, onedrive or googledrive folder and share the link with the community. Please provide more details with your desired out put and pbix file without privacy information.

 

Please refer to the related links for details:

How to provide sample data in the Power BI Forum - Microsoft Fabric Community

How to Get Your Question Answered Quickly - Microsoft Fabric Community

 

Best Regards,

Ada Wang

Dear Ada

I have shared the link of my file, please let me know if you could open it.

Thanks in advance

Best regards

Anonymous
Not applicable

Hi @locariz ,

Did you set permissions? I cannot open it.

Best Regards,

Ada Wang

 

https://1drv.ms/u/s!AjrYk0cI0DtinZ4xuUyj9Jq_IL61JQ?e=r4tcsh 

Dear Ada 

Please try with this link. If it does not work, please let me know if I could send it by email.

Thanks again

Best regards

Anonymous
Not applicable

Hi @locariz ,

The link you posted seems to be an example I created earlier, but I may have figured out the problem you are trying to solve.

I created another example using your previous screenshot, you can add a measure:

VENTA AJUSTADA = SELECTEDVALUE('Table'[venta])*SELECTEDVALUE('Table (2)'[Indice])

Final output:

vyifanwmsft_0-1707189360938.png

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.

 

 

https://1drv.ms/u/s!AjrYk0cI0DtinZ8wqzX0MDWRpnzISg?e=bvEf4q 

 

Dear Ada, I am terrible sorry for my mistake with the file.

Please find attached the correct one.

We need the whole column "venta" multiplied by the same one selected index (if we change the selected index, we expect the value in "venta ajustada" to change) . 

Thanks again.

Regards

https://1drv.ms/u/s!AjrYk0cI0DtinZ8wqzX0MDWRpnzISg?e=bvEf4q  

Dear Ada, did you have any chance of checking the file of the link?

Thanks again for all your help

 

Ahmedx
Super User
Super User

pls try his
LastDate = CALCULATE(LASTDATE('Table'[Date]),REMOVEFILTERS())

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 ayudatabla.jpg

I don't really understand what you want
but try this

LastDate = CALCULATE(EOMONTH(MAX('Table'[Date]),0),REMOVEFILTERS())

Muchas gracias, aun no me funciona. Lo que tratamos de obtener es que, al numero que esta en la columna “Importe local” de la tabla 1  lo multiplique por el valor correspondiente a la ultima fecha de la segmentación según la tabla 2. Para este ejemplo  seria multiplicar por 2044,2832 correspondiente al 31/08/23, y si  modificamos dicha segmentación, que varie el valor por el que se multiplica. No se si esto es posible en power Bi.

Muchas gracias por su ayuda y sino esta claro puedo intentar en ingles.

segmentacion en la pagina.pngtabla 1.pngtabla 2.png

if you want to create a calculated column and select a date from a visual filter, this will not work

power bi doesn't support it

Muchas gracias por tu pronta respuesta. Una ultima consulta que podria tambien servirnos. Es posible ingresar a mano en la pagina una fecha (o seleccionar de una lista) en un nuevo objeto visual o algo parecido, y que  luego esa misma fecha aparezca  en una columna de la tabla 1 para todas las filas?

gracias nuevamente

 

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.