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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.