Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi all - I have a very large dataset, spanning 10 years, where we havew mapped client trends over time. I need to know how to work out the number of clients seen per hour, on average per month. Each client contact is identified by 'Event Key' field and is unique. The hour in which the contact was made is identified by 'Hour' field, and obviously the respective date this was made is 'Event Date'.
On a graph I need to show our average per hour, but for each month in the dataset. I'd like to show another chart which simply shows average per houre, per event date (though this would look a bit more messy as a chart).
If you're able to show me the way, I'd be really grateful. Sample dataset attached. Many thanks!
Sample Data Client Average Per Hour
Solved! Go to Solution.
Hi @Creative_tree88 ,
You may be talking about matrix totals, where you can use functions such as HASONEFILTER or ISINSCOPE to perform different calculations for the total row.
In this case, you can create an expression to get the average value for April 2014 and then return it in the total hierarchy.
For more details, please refer to the link:
Dealing with Measure Totals - Microsoft Fabric Community
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Creative_tree88 ,
Create measure.
Average Clients Per Hour Per Month =
VAR _sumhour =
CALCULATE (
SUM ( 'Sample Data'[Hour] ),
FILTER (
ALL ( 'Sample Data' ),
'Sample Data'[Event Date].[Month] = MAX ( 'Sample Data'[Event Date].[Month] )
&& 'Sample Data'[Event Date].[Year] = MAX ( 'Sample Data'[Event Date].[Year] )
)
)
VAR _count_clients =
CALCULATE (
DISTINCTCOUNT ( 'Sample Data'[Event Key] ),
FILTER (
ALL ( 'Sample Data' ),
'Sample Data'[Event Date].[Month] = MAX ( 'Sample Data'[Event Date].[Month] )
&& 'Sample Data'[Event Date].[Year] = MAX ( 'Sample Data'[Event Date].[Year] )
)
)
RETURN
DIVIDE ( _count_clients, _sumhour )
Average Clients Per Hour Per Day =
VAR _sumhour =
CALCULATE (
SUM ( 'Sample Data'[Hour] ),
FILTER (
ALL ( 'Sample Data' ),
'Sample Data'[Event Date] = MAX('Sample Data'[Event Date])
)
)
VAR _count_clients =
CALCULATE (
DISTINCTCOUNT ( 'Sample Data'[Event Key] ),
FILTER (
ALL ( 'Sample Data' ),
'Sample Data'[Event Date] = MAX('Sample Data'[Event Date])
)
)
RETURN
DIVIDE ( _count_clients, _sumhour )
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous Thanks for your reply, much appreciated. The numbers for average per day are really low. I've used this formula:
Hi @Creative_tree88 ,
You may be talking about matrix totals, where you can use functions such as HASONEFILTER or ISINSCOPE to perform different calculations for the total row.
In this case, you can create an expression to get the average value for April 2014 and then return it in the total hierarchy.
For more details, please refer to the link:
Dealing with Measure Totals - Microsoft Fabric Community
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
7 | |
4 | |
4 |