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
10664334
Frequent Visitor

Count Average days between date difference

Hi all

I have made this measure called AVG delivery days ( see second last image for formula), however once I try to put it on a visual there is data missing, we have more deliveries for other departments in February, for example DEP 615, but I have nothing. Not all orders have a delivery date, (is this impacting my results as its a null value)

I have tried doing a column on the query editor for the difference but the null values still come as 0 and I cannot get a result.

 

Please let me know a solution No data for departments with empty datesNo data for departments with empty datesMeasure AVG  DELIVERY DAYSMeasure AVG DELIVERY DAYSDate values ETA and Delivery StartDate values ETA and Delivery Start

4 REPLIES 4
Ahmedx
Super User
Super User

I'm not sure if I understood you correctly, but try writing like this:

AVE RAG EX (
SUMMARIZE(ALLSELECTED('Ops Master'),'Ops Master’[ETA],'Ops Master’[DELIVERY START]),
DATEDIFF(’Ops Master’[ETA],’Ops Master’[DELIVERY START],DAY))

Hi Ahmed 

Can you help me out? 

 

Hi Amhed,

 

I just basically want the difference betwen Delivery Start minus the ETA, and then get the average days.

 

But as I have empty cells I cant get accurate data. Hope this helps 

 

I have tried copying pasting the above but I only get the same value 

I need to count the rows that have a date value not the blanks, otherwise its not accurate image.png

 

 

Pretty much this average highlighted 

 

 

10664334_0-1678157671889.png

 

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.