Forum Discussion
Anonymous
4 years agoNot applicable
How to Calculate Average While Keeping One Filter
The selected value of Employee ID from filter shows a Department value in the text label for Department field. The ask is now to calculate the average of performance ID for the whole department of t...
- 4 years ago
Anonymous try this measure
Dept Performance = VAR __deptId = MAX ( Data[Department ID]) RETURN AVERAGEX ( FILTER ( ALL ( Data ), Data[Department ID] =__deptId ) , CALCULATE ( SUM(Data[Performance ID] ) ) )✨ Follow us on LinkedIn and to our YouTube channel
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.
Anonymous
4 years agoNot applicable
Ashish_Mathur , johnt75 , parry2k
Shairng the file link- if you can please have a look and help
https://drive.google.com/file/d/1xkK35yYfZ_Opyg9vJKbUMQXni_2Nlc9Q/view?usp=sharing
Ashish_Mathur
Super User
4 years agoHi,
Based on the file that you have shared, the answer should be 4. Try these measures:
Department of selected employee = MAX(Data[Department])Dept Performance = calculate(average(Data[performance id]),FILTER(VALUES(Data[Department]),Data[Department]=[Department of selected employee]))
/*CALCULATE(AVERAGEX(Data,Data[Performance ID]),SELECTEDVALUE(Data[Department])
CALCULATE( AVERAGE(Data[Performance ID]),KEEPFILTERS(SELECTEDVALUE(Data[Department])))*/
Hope this helps.