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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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