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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
EllenG
Frequent Visitor

Max (date) measure error message

Would appreciate help understanding why the below measure isn't working - the error is "a single value for Delivery Date cannot be deterimined. This can happen ...when the column contains may values without specifying an aggreggation."
 
thank you!
 
LastOrdered = CALCULATE(max(Sales[Delivery Date],filter(Sales, Sales[Amount]>0)))
1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

Hi @EllenG ,

Just as amitchandak mentioned,Wrongly place parenthesis.

the following data,base data:

v-luwang-msft_0-1621498372625.png

If you want to determine if there is an Amount greater than 0 for that day and output the date if there is, then use the following measure,just what  amitchandak  provided:

LastOrdered = CALCULATE(max(Sales[Delivery Date]),filter(Sales, Sales[Amount]>0))

v-luwang-msft_1-1621498541436.png

 

 

If you want to get the largest date of all dates with amount > 0, then use the following measure:

LastOrdered = CALCULATE(max(Sales[Delivery Date]),filter(ALL(Sales), Sales[Amount]>0))

v-luwang-msft_2-1621498575907.png

 

 

Wish it is helpful for you!

 

Best Regards

Lucien

View solution in original post

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

Hi @EllenG ,

Just as amitchandak mentioned,Wrongly place parenthesis.

the following data,base data:

v-luwang-msft_0-1621498372625.png

If you want to determine if there is an Amount greater than 0 for that day and output the date if there is, then use the following measure,just what  amitchandak  provided:

LastOrdered = CALCULATE(max(Sales[Delivery Date]),filter(Sales, Sales[Amount]>0))

v-luwang-msft_1-1621498541436.png

 

 

If you want to get the largest date of all dates with amount > 0, then use the following measure:

LastOrdered = CALCULATE(max(Sales[Delivery Date]),filter(ALL(Sales), Sales[Amount]>0))

v-luwang-msft_2-1621498575907.png

 

 

Wish it is helpful for you!

 

Best Regards

Lucien

amitchandak
Super User
Super User

@EllenG , Try like

 

LastOrdered = CALCULATE(max(Sales[Delivery Date]),filter(Sales, Sales[Amount]>0))

 

Wrongly place parenthesis

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors