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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Average of measures ( between 2 dates)

 

1.PNG

Raw data: Machine | Date | Unit | Week 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Calcaulations (What i need help with):

 

2.PNG Average = 53 = 2565/ 48 

        2565 = sum of units

            48 = sum # of active weeks. 

Sum (Active week for each machine) = last week is nonblank - first week is nonblank

 

Questions: How do i get to the overall level of #active week? (i can do Max(date) - Min(date) for individual machines, but for overall level, it will always be 6 weeks.. Average = 53 is what i need to get to. 

Thank you!

6 REPLIES 6
v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

Shouldn't it be like this?

Please refer to my .pbix file.

v-lionel-msft_0-1603879977054.png

v-lionel-msft_1-1603880008999.png

 

Best regards,
Lionel Chen

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

 

amitchandak
Super User
Super User

@Anonymous ,

distinctcount([week number])

 

New column = [Machine] & [week Number]

distinctcount([New column])

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

@amitchandak It wont work that way, because its counting the week that has positive number.

So if week 2 and 4 has non 0, that will be counted as 2 week, but I need to count 2, 3, and 4. for 3 weeks. for each machines, 

 

then sum that result for each individual machine. like the following. 

1.PNG

Hi @Anonymous ,

 

v-lionel-msft_0-1601018379488.png

Please refer to my .pbix file.

 

Best regards,
Lionel Chen

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

Anonymous
Not applicable

@v-lionel-msft That's not what I am looking for. 

 

By the example in your file, the average will be 1010/26 weeks = 39/weeks

 

 #Week Counts
Machine15
Machine25
Machine33
Machine42
Machine54
Machine63
Machine82
Machine92
 26
 38.84615
Fowmy
Super User
Super User

@Anonymous 

The data you posted is in picture, just pate your data from Excel so I can solve and share the solution.

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors