Forum Discussion
RichOB
Post Partisan
1 year agoGetting an average for the year based on Quarterly figures
Hi, how can I get the average number of clients seen per quarter based on the total seen in the fiscal year?
I have a COUNT measure called Client_ID
And a new column for the Fiscal_Quarter
How can I show that the fiscal year average is 4.25 based on the below:
Q1 = 4
Q2 = 2
Q3 = 6
Q4 = 5
Table for reference:
| Client_ID | Date |
| 1 | 01/04/2024 |
| 2 | 01/04/2024 |
| 3 | 01/04/2024 |
| 4 | 01/07/2024 |
| 5 | 01/07/2024 |
| 6 | 01/10/2024 |
| 7 | 01/10/2024 |
| 8 | 01/10/2024 |
| 9 | 01/10/2024 |
| 10 | 01/10/2024 |
| 11 | 01/10/2024 |
| 12 | 01/01/2025 |
| 13 | 01/01/2025 |
| 14 | 01/01/2025 |
| 15 | 01/01/2025 |
| 16 | 01/01/2025 |
Thanks
Hi RichOB
Assuming that each date in your sample data is either the start or end of a fiscal quarter, try this:
average = AVERAGEX ( SUMMARIZECOLUMNS ( Client[Date], "@count", COUNTROWS ( Client ) ), [@count] )
3 Replies
- Kedar_Pande
Super User
Avg Clients per Quarter =
Var _all=CALCULATE(
[Client_ID],
ALL('YourTable'[Fiscal_Quarter])
)
Var _count=
DISTINCTCOUNT('YourTable'[Fiscal_Quarter])
return _all/_countThis will give you the average number of clients seen per quarter for the fiscal year, showing 4.25 as expected based on your provided data.
💌 If this helped, a Kudos 👍 or Solution mark ✅ would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn