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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.