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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Summarizing Issue

Hello Community, 

 

I think this issue is pretty simple but I'm struggeling a bit and won't spend more time on it: 

 

yy_delete = 

SUMMARIZE(ALLSELECTED(Transactions),Transactions[order],Transactions[delivery_Date], Transactions[booking_Date],"h",DATEDIFF(Transactions[delivery_Date],Transactions[booking_Date],HOUR))

 

inf1948_0-1657094190187.png

 

I have dublicated orders in the summarize-output which I'd like to avoid by only keeping the lates booking_Date. In the example above the desired output should look like this: 

A   |    25.02.2022 07:15:00    | 01.03.2022 16:00:00   | 105

 

Thank you in advance! 

 

 

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Try a measure like

 

Measure =
VAR __id = MAX ('Transactions'[order] )
VAR __date = CALCULATE ( MAX('Transactions'[booking_Date] ), ALLSELECTED ('Transactions' ), 'Transactions'[order] = __id )
return
CALCULATE ( sumx(Transactions, DATEDIFF(Transactions[delivery_Date],Transactions[booking_Date],HOUR)), VALUES ('Transactions'[order] ),'Transactions'[order] = __id,'Transactions'[booking_Date] = __date )

 

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
Anonymous
Not applicable

Hello,

thank you! 

 

This worked for me: 

 

 

var _vTableTmp = 
SUMMARIZE(ALLSELECTED(Transactions)
 ,Transactions[order]
 ,Transactions[delivery_Date]
 ,"MaxBookingDate"
 ,max(Transactions[booking_Date])
)

var _vTable = 
SUMMARIZE(_vTableTmp 
 ,Transactions[order]
 ,Transactions[delivery_Date]
 ,[MaxBookingDate]
 ,"vDelta",
 DATEDIFF(Transactions[delivery_Date],[MaxBookingDate],HOUR)
)

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.