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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
anorville
Helper I
Helper I

Valor de búsqueda basado en las condiciones de las fechas

¡Buenos días!

Tengo dos tablas:

1)

LeaseNumFecha efectivaPriceContractNumberPrecio
43644410/1/2020ENL-P072010520
4364447/1/2020ENL-P07201052-3.80

2)

LeaseNumTicketDateBúsqueda de la fecha del último contratoBúsqueda de último precio
4364447/1/20207/1/2020-3.80
4364448/1/20207/1/2020-3.80
4364449/1/20207/1/2020-3.80
43644410/1/202010/1/20200

Estoy tratando de extraer datos de la tabla 1 en la tabla 2.

  • Criterios 1 - si arrendado (tabla2) - arrendatario (tabla1)
  • Criterios 2 si ticketdate (tabla2) es ?

No estoy seguro de la mejor manera más eficiente de calcular esto para obtener los rewsults deseados ( Columnas rojas).

Realmente aprecio cualquier ayuda, gracias a todos!

"Esperanza de ser un datanaut"

Austin

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@anorville

tal vez usted puede tratar de crear dos columnas

Column = MAXX(FILTER(Table1,Table1[LeaseNum]=Table2[LeaseNum]&&'Table1'[EffectiveDate]<=Table2[TicketDate]),Table1[EffectiveDate])

Column 2 = MAXX(FILTER(Table1,Table1[LeaseNum]=Table2[LeaseNum]&&'Table1'[EffectiveDate]=Table2[Column]),'Table1'[Price])

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

6 REPLIES 6
ryan_mayu
Super User
Super User

@anorville

tal vez usted puede tratar de crear dos columnas

Column = MAXX(FILTER(Table1,Table1[LeaseNum]=Table2[LeaseNum]&&'Table1'[EffectiveDate]<=Table2[TicketDate]),Table1[EffectiveDate])

Column 2 = MAXX(FILTER(Table1,Table1[LeaseNum]=Table2[LeaseNum]&&'Table1'[EffectiveDate]=Table2[Column]),'Table1'[Price])

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Bien, gracias @ryan_mayu .

Te dejo con eso.



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Amazing @ryan_mayu and @BA_Pete thanks for the quick replies! It works like a charm!

 

Austin

BA_Pete
Super User
Super User

@anorville ,

Creo que esto depende del rendimiento del DAX.

Voy a mirar ahora y ver si puedo armar algo performante en DAX para que lo pruebes. Si no, lo haremos en PQ.



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




BA_Pete
Super User
Super User

Hola @anorville ,

lol "Esperanza de ser un Datanaut"!

*Editar * No quise decir esto de una manera mala, sólo pensé que era una verión divertida de las firmas "Orgulloso de ser un Datanaut" 🙂

¿Pretende hacer el suyo en Power Query o DAX?



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




¡Oye! @BA_Pete Espero hacer esto en DAX, a menos que piense que Power Query sería lo mejor. Lo siento por no especificar!

Austin

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors