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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
rodrigomocca
Frequent Visitor

Daily Average

Hi,

I've asked for this almost 2 month ago, but not response. I'm posting this again hoping somebody can help me.

 

I have a table with this columns:

 

RecordDate | TimeTracked | TeamMember | Activity

 

I need to get the daily average of time tracked for a user and an activity.

 

I'm using this measure

CALCULATE(AVERAGEX(VALUES(TimeExport[RecordDate]), TimeExport[TotalTracked]))

but this does not have in account days with no time tracked, this only gives me the average for all days with time tracked.

 

Here is some example data:

2018-02-22_11-29-24.png

 

How can I do this?

 

Thanks in advance.

3 REPLIES 3
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @rodrigomocca,

 

According to your requirements, the result, could be a table visual, should contain TeamMember, RecordDate, ActivityType. Please check out the demo here.

Daily_Average

BTW, if you can input the sample data in TEXT mode, it could be convenient to others to test.

 

Best Regards,

Dale

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

Hi, thanks for your answer.

The solution is not what I'm looking for. Maybe the title is confusing.

I'll give you a more detailed example:

Let's say the user Rodrigo Mocca have the following rows:

 

Date Team Member Activity Time Tracked

DateTeam MemberActivityTime Tracked
03/05/2018Rodrigo MoccaDevelopment5
03/06/2018Rodrigo MoccaDevelopment3
03/07/2018Rodrigo MoccaDevelopment5
03/09/2018Rodrigo MoccaDevelopment6

In the last 5 days, he only track time for development on 4. What I need to get from here is:

"Rodrigo Mocca spends 3.8 in development by day in average".

This result comes from (5+3+5+6)/5

The calculation I have right now gives me 4.75, because doesn't take in account the empty day.

Do you understand my problem now?

@rodrigomocca

 

Try with this:

 

Result =
DIVIDE (
    SUM ( Table1[Time Tracked] );
    DATEDIFF ( MIN ( Table1[Date] ); MAX ( Table1[Date] ); DAY ) + 1
)

Maybe need some adjustment when is just 1 day of Difference or if you want to doesn't cout weekends but this is the logic.

 

Regards

 

Victor




Lima - Peru

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.