Forum Discussion
Average Frequency by Hour Calculation
- 5 years ago
mccollough here are 3 measures to get this going. these are self-explanatory but if you need further details, let me know.
Count Exams = COUNTROWS ( Exam1 ) //exam1 is a name of the table in my model Number of Days = CALCULATE ( DISTINCTCOUNT ( Exam1[Report Date] ), ALLSELECTED () ) Avg per Hour = VAR __examDays = Exam1[Number of Days] RETURN SUMX ( SUMMARIZE ( Exam1, Exam1[Report Hour], Exam1[Task Type], "@AVG", DIVIDE ( [Count Exams], __examDays ) ), [@AVG] )✨ Follow us on LinkedIn
Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
mccollough here are 3 measures to get this going. these are self-explanatory but if you need further details, let me know.
Count Exams = COUNTROWS ( Exam1 ) //exam1 is a name of the table in my model
Number of Days = CALCULATE ( DISTINCTCOUNT ( Exam1[Report Date] ), ALLSELECTED () )
Avg per Hour =
VAR __examDays = Exam1[Number of Days]
RETURN
SUMX (
SUMMARIZE (
Exam1,
Exam1[Report Hour],
Exam1[Task Type],
"@AVG", DIVIDE ( [Count Exams], __examDays )
),
[@AVG]
)
✨ Follow us on LinkedIn
Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
- mccollough5 years ago
Helper I
Worked like a charm!
Thank you for your help!!!