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
Hugo_RGS
Regular Visitor

Date Betwen

Hello guys,

Im trying to solve a problem i found while building my data model.
I got 2 differents tables :

- One with the account balance by month for each tenant.

Tenant AccountMonthAccount balance
48106-2022125 €
48107-2022422 €
48108-202223 €


- One with the litigation phase of the tenant, with the start date & the end date of the phase.

Tenant AccountLitigation phaseStart DateEnd Date
481Phase 113/05/202123/08/2021
481Phase 203/01/202224/07/2022
481Phase 106/08/202223/08/2022 

 

I have to associate the correct phase to each line in the first table. Any idea ? 

Thanks for reading 😄

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Hugo_RGS , Create a new column in table 1, convert account month into date or create a date from it

 

maxx(filter(Table2, Table2[tenant Account] = table1[tenant Account] && table1[Account Date]>= Table2[Start Date] && Table1[Account Date] <=  Table2[End date])  , Table2[Litigation phase])

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Hugo_RGS , Create a new column in table 1, convert account month into date or create a date from it

 

maxx(filter(Table2, Table2[tenant Account] = table1[tenant Account] && table1[Account Date]>= Table2[Start Date] && Table1[Account Date] <=  Table2[End date])  , Table2[Litigation phase])

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.