Forum Discussion
harshagraj
6 years agoPost Partisan
Average loop type per project
HI all, I need average loop type for the below table. loop_type column is a dimension. Thanks in advance.
Need to display this in a card. I have a project slicer to filter.
| Project | ToolNo | loop_type | Count of loop_type |
| PRJ-16 | 28-178 | Planned Loop | 2 |
| PRJ-17 | 28-179 | Finished Loop | 4 |
| PRJ-18 | 28-180 | Finished Loop | 6 |
| PRJ-19 | 28-181 | Planned Loop | 1 |
| PRJ-20 | 28-182 | Planned Loop | 1 |
Loop count = countx(filter(Table, [project] =earlier([project]) && [loop type] = earlier([loop type])),[loop type])
Avg Loop =AverageX(filter(Table, [project] =earlier([project])),[Loop count])
7 Replies
- amitchandakSuper User
harshagraj , not very clear
averagex(values(dim[Project]),max(Table[Count of loop_type]))
or
averagex(summarize(dim[Project],"_1",max(Table[Count of loop_type])),[_1])- harshagrajPost Partisan
Hi amitchandak thanks for the reply. Actually i dont have [Count of loop_type] column i just changed that in value shelf from a table and dragged.
- amitchandakSuper User
harshagraj , Not very clear, what you need?