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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
bw70316
Helper V
Helper V

Reveal Average from Date range with cumulative Data

I have A Date of Original Placement and Ages that they were put in placement:

 

The data below is the Range of placement for children from 2/1/2019-2/28/2019. As you can see by the months, the dates come in several times because the same child has the same Date of Original Placement due to the fact that the data is cummulative. I am trying to extract the Average for Just February, but really dynamically so that I grab the first dates in the Date of Original Placement (in this case February) and spit out the Average Age of just those individuals. I would like to filter by month.

 

So in this case the Average of the Ages of the 7 Febs would be the value I'd like. 

 

AGEDate of Original PlacementMonth
52/7/2019June
152/26/2019June
52/7/2019May
152/26/2019May
52/7/2019April
152/26/2019April
152/26/2019March
52/7/2019July
102/6/2019May
102/6/2019April
102/6/2019March
102/6/2019July
102/6/2019June
62/27/2019July
92/27/2019July
92/13/2019July
62/27/2019June
92/27/2019June
92/13/2019June
62/27/2019May
92/27/2019May
82/13/2019May
62/27/2019April
92/27/2019April
82/13/2019April
62/27/2019March
92/27/2019March
112/6/2019March
82/13/2019March
112/6/2019July
112/6/2019June
112/6/2019May
112/6/2019April
152/26/2019July
52/7/2019March
62/27/2019February
92/27/2019February
112/6/2019February
52/7/2019February
82/13/2019February
152/26/2019February
102/6/2019February
2 REPLIES 2
v-xuding-msft
Community Support
Community Support

Hi @bw70316 ,

I am a little confused about your requirement. Do you want to calculate the average values of the first date per month? In your sample data, the first date is 2/6/2019.  I tried to create a sample you can reference.

Measure = 
var mi = MIN('Table'[Date of Original Placement])
return
CALCULATE(AVERAGE('Table'[AGE]),FILTER('Table','Table'[Date of Original Placement] = mi))

4.PNG

Is this what you want? If not, can you please post the expected result?

 

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I am trying to achieve February's dates as the only dates of entry. Those other dates are a result of new data coming in. Some of the kids are repeated, others exit or enter. Below is the data I want to grab, but I want it dynamically so that for whatever average age is for that month's dates of original placement appears.

foster care.png

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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