cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JMST
Frequent Visitor

Error with DATEDIF

Hi guys!

 

I'm building the following measure:

Last30Days =
IF(
DATEDIFF('Product Properties' [Last inventory date], 'Product Properties'[Report Date],DAY) <=31,
TRUE(),
FALSE()
)

And I obtain the following error: It is impossible to determine a unique value for the "Last inventory date" column in the "Product Properties" table. 

 

Could someone help me with this error?

 

Thanks!

1 REPLY 1
vk_pbi
Resolver II
Resolver II

The reason is that, the last inventory date may have repeated values.. I think you can wrap it with MAX to handle this

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Top Solution Authors