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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Crear tabla calculada sacando valores únicos más reciente según fecha

Hola amigos, requiero de su valiosa colaboración.

 

Tengo una tabla (AVANCE) con los datos de las Entregas de Raciones de alimentos (RPP) que se entregan en unas UDS (Unidades de Servicio).

Las entregas se hace en cada UDS en fechas diferentes.

Yo requiero hace runa tabla calculada para que sólo parezcan los datos de la Entrega de RPP Total que se hayan hecho en la fecha más reciente para CADA UDS.

 

Lo he intentado de todas las formas, pero no he podido hacerlo bien. Al final requiero sumar todas los Roral_RPP para dar un único valor por contrato, pero los resultados salen mal y arroja datos que no son.

 

Captura.JPG

Agradezco su valiosa colaboración

1 ACCEPTED SOLUTION
dax
Community Support
Community Support

Hi @Anonymous , 

It might be the version of my pbix lower than your, so you can't open the pbix file, you could just click option to open it. In addition, in your below image , I  find that you miss ")"  after max('Avance'[start]), you could check it and add it to see whether it work or not.

 
Measure = var maxd=CALCULATE(MAX('Table'[DATE]), ALLEXCEPT('Table','Table'[UDS])) return CALCULATE(SUM('Table'[amount]), FILTER('Table', 'Table'[DATE]=maxd))

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
dax
Community Support
Community Support

Hi @Anonymous , 

It seems that you want to show only newest date for each USD, right? If so, you could try to refer to my sample for details. If not, could you please inform me more detailed information(such as your expected output and your sample data (by OneDrive for Business))? Then I will help you more correctly.

Please do mask sensitive data before uploading.

Thanks for your understanding and support.
Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hola, mchas gracias.

Al intentar abrir el archivo .pbix que ud envía, sale este mensaje:

Msg.JPG

 

Sin embargo lo pude abrir y pude ver una solción que ud plantea.
La ajusté a mis datos pero.... sale un mensaje de error 😢😭

 

Msg2.JPG

 

Será por la versión?? O estoy haciendo algo mal??

dax
Community Support
Community Support

Hi @Anonymous , 

It might be the version of my pbix lower than your, so you can't open the pbix file, you could just click option to open it. In addition, in your below image , I  find that you miss ")"  after max('Avance'[start]), you could check it and add it to see whether it work or not.

 
Measure = var maxd=CALCULATE(MAX('Table'[DATE]), ALLEXCEPT('Table','Table'[UDS])) return CALCULATE(SUM('Table'[amount]), FILTER('Table', 'Table'[DATE]=maxd))

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

With this example, it is not very clear what you need.

Can you share sample data and sample output.

Anonymous
Not applicable

Hola. Gracias por atender mi inquietud.

 

Intentaré ser un poco más detallado en lo que necesito.

 

La tabla AVANCE registra los valores de Raciones de Alimentos (RPP) que se hacen en cada Unidad de servicio (UDS) en fechas diferentes.

Cada UDS pertenece a un contrato.

 

Por ejemplo:

El contrato 85000842020 tiene 3 Unidades de Servicio (UDS):

 

En cada UDS se hacen entregas de RPP en diferente día

Captura.jpg

 

Como se hacen entregas en varios días, van quedando varios registros por UDS. Pero yo necesito mostrar ÚNICAMENTE la entrega de la fecha más reciente para cada UDS.

Ejemplo:

La UDS "Los Gnomitos" hizo entregas los días 24, 25, 26 y 26 de marzo. Yo necesito en una gráfica mostrar sólamente la entrega  de RPP más reciente, o sea la del 27/03/2020. El valor que debe mostrar ÚNICAMENTE de RPP es 14.

 

No he podido hacer ese filtro y al mostrar la información, me muestra todas la entregas de RPP, pero es un error que muestre todas. ÚNICAMENTE SE DEBE MOSTRAR LA ENTREGA DE RPP más reciente.

Y esto se debe hacer para cad UDS.

 

Agradezco la atención

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.