Forum Discussion
Anonymous
3 years agoNot applicable
Calculate total average
Hi all,
I am calculating a column called "Comletion".
The measurs are
- Inspection KPI 2 = COUNT('Inspection Staff'[Form ID])-'Employee Transaction'[84 Hours Rule ]
- 0 or 1 = IF('Inspection Staff'[Inspection Counts]=0, 0, IF('Inspection'[Inspection KPI 2]<0, 'Inspection Staff'[Inspection Counts]/[84 Hours Rule ],1))
- Completion =AVERAGEX ( VALUES ( 'Staff'[Staff Name]), 'Inspection'[0 or 1] )
All the numbers in hte matrix table are reight. But if I use job name and completion to make a graph, the completion number are wired. And I pull the completion in a card, the number is also wrong.
Could anyone help to write a new measure to make the number right in the card and in the graph?
Thank you in advance!
Branko
- Anonymous3 years ago
I have already address the issue. I re-write the measure of "completion" as follow:
Completion for Job = DIVIDE(SUMX(VALUES('Staff'[User Name]),'Inspection'[0 or 1]),COUNTX(VALUES('Staff'[User Name]),'Inspection Staff'[Inspection Counts for Inspection Crew]))Now the outcoming from both matrix table and graph are equal.
4 Replies
- tamerj1
Community Champion
Hi Anonymous
Are you sure both job name columns in matrix and charts are the same column from the same table?
- AnonymousNot applicable
Yes, they are in the same column and same table.
- v-xiaotang
Community Support
HI Anonymous
Thanks for reaching out to us.
could you share a sample .pbix file for us to troubleshoot? thanks
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
I have already address the issue. I re-write the measure of "completion" as follow:
Completion for Job = DIVIDE(SUMX(VALUES('Staff'[User Name]),'Inspection'[0 or 1]),COUNTX(VALUES('Staff'[User Name]),'Inspection Staff'[Inspection Counts for Inspection Crew]))Now the outcoming from both matrix table and graph are equal.