cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors