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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
saikarthick
Frequent Visitor

Need to find interval from two date columns which is from different tables

Hi Everyone,

 

I need to find interval from two date columns which is from different tables and not in direct realationship

 

Interval days = 'customer_policies'[Approval_date] - 'policy_sales'[sale_date]

 

Facing some issue in sharing screenshot, otherwise i would have shared it.

 

so, Relation between tables are below:

 

customer_policies[customer_id] ---many to one --customer[customer_id]

customer[customer_id] --- one to many ---policy_sales[customer_id]

 

Kindly some one help on this with explanation if possiblle.

 

Thanks in advance.

3 REPLIES 3
v-shex-msft
Community Support
Community Support

Hi @saikarthick,

 

I'd like to suggest you to add a calculate column at 'many side' to reference date column from 'one side', then you can simply use datediff function to calculate interval.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Thanks bro. I am very new to power bi.

Can u please explain me with an example. If possible on same scenario.

HI @saikarthick,

 

Can you please share a sample pbix file? I will add sample formula on it.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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