Forum Discussion

sbharti123's avatar
sbharti123
Frequent Visitor
7 years ago
Solved

Creating average of a measure in a table visualization

I have created a measure which is calculated based on selection in a slicer. Its logic is as below:

 

measure1 = SWITCH( SELECTEDVALUE ('QList'[QNO]), "Q1",Sum(table[Q1]),  "Q2",Sum(table[Q2]), BLANK() )
 
It is displaying perfectly as shown below:
NAMEMEASURE1
JOHN100
TINA200
MIKE300
 
Now, I want to create another measure which will calculate average of all values shown in above table. That is (100+200+300) /3 = 200
Therefore, for each of the employee above, there will be a new column called MEASURE2 just showing 200.
 
The problem is that I have another slicer on the page which selects their manager. So for some managers there can be more/less employees.
 
I just can't get my head around this, can anyone suggest?

1 Reply