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
Anonymous
Not applicable

Average by category quick measure

Average Parts per Day =
AVERAGEX(
KEEPFILTERS(VALUES('UGUExports'[Occured].[Day])),
CALCULATE(COUNTA('UGUExports'[Part]))
)

 

The above formula is a quick measure I use to calculate the average parts per day submitted to my database. This formula works fine, but when I manually calculate the average parts submitted per day I get a value off by 8 parts per day. 

 

What I think is happening is that the above formula is calculating the average based on the dates listed in the [occured] column. What I need is it to calculate the average based on all days between firstdate[occured] and lastdate[occured]. 

 

Basically, I need the formula to account for days in between submission dates too. 

 

Can someone help with creating a formula to accomplish this? I am new to Power Bi and would really appreciate the guidence.

 

Thanks in advance.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Just incase anyone else has this same question I found a easy work around. I dont know I didnt try this sooner actually.

 
Average Parts Per Day = COUNT(UGUExports[Part])/COUNT(Range[Date])
 
The table :"Range" in the above formula is a separate table I made from the "Occured" column I mentioned in the original question.
Here is the formula for that:
 
Range = CALENDAR(FIRSTDATE(UGUExports[Occured]),LASTDATE(UGUExports[Occured]))

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Just incase anyone else has this same question I found a easy work around. I dont know I didnt try this sooner actually.

 
Average Parts Per Day = COUNT(UGUExports[Part])/COUNT(Range[Date])
 
The table :"Range" in the above formula is a separate table I made from the "Occured" column I mentioned in the original question.
Here is the formula for that:
 
Range = CALENDAR(FIRSTDATE(UGUExports[Occured]),LASTDATE(UGUExports[Occured]))

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.