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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
AdamD123
Helper I
Helper I

Work out average from a new measure

Hello,

 

I kindly had some help me to create a new measure to show the number of days between an order date and receipt date (posting date). Now I have this measure showing the days in between, I would like to understand how I work out the average of these dates.

For example, in the below image I have selected item FA0002 and we have two orders showing a lead time of 13 and 6. The card to the right ideally would show the average of these dates, 9.5:

AdamD123_0-1718097637760.png

The measure for the lead time is:

AdamD123_1-1718097673996.png

How would I now work out the average - do I need to do another measure for this?

Kind regards,

Adam

 

5 REPLIES 5
ryan_mayu
Super User
Super User

@AdamD123 

you can try this

 

avg = sumx(values('Table (2)'[Dcoument_No]),[leadtime])/DISTINCTCOUNT('Table (2)'[Dcoument_No])
 
11.PNG




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi Ryan,

 

Thank you for your reply. I have tried this but seem to be getting a different result:

AdamD123_0-1718101491989.png

 

could you pls provide the pbix file?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hello, sorry I am not sure how I do this and there is sensitive data which I would not be allowed to share.

then you can see what's the difference between my sample data and yours. maybe you can update your sample data.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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