Forum Discussion
sbharti123
7 years agoFrequent Visitor
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:
| NAME | MEASURE1 |
| JOHN | 100 |
| TINA | 200 |
| MIKE | 300 |
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?
Hi sbharti123 ,
To create a measure as below to get the average.
Measure = AVERAGEX(ALLSELECTED('table'),[measure1])
1 Reply
- v-frfei-msft
Community Support
Hi sbharti123 ,
To create a measure as below to get the average.
Measure = AVERAGEX(ALLSELECTED('table'),[measure1])