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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
rtUsmanKhan
Regular Visitor

DATEDIFF - Calculate date difference from different tables

Hi, I have two related tables Products and Logs. I need to calculate difference of dates as

Products.Date_Entered and

Logs.Date_modified.

Unfortunately Power BI DATEDIFF does not allow me to use columns from different tables using New Column.

Please suggest me a way to achieve this without using any aggregate function on 1 column.

 

This is Error "A single value for column 'Date_Entered' in table 'Products' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result."

Your earliest response will be highly appreciated.

1 ACCEPTED SOLUTION
PavelR
Solution Specialist
Solution Specialist

@rtUsmanKhan

try using Related function, and then subtracting these dates.

 

Regards.

Pavel

View solution in original post

2 REPLIES 2
PavelR
Solution Specialist
Solution Specialist

@rtUsmanKhan

try using Related function, and then subtracting these dates.

 

Regards.

Pavel

Thanks it worked for me.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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