Forum Discussion
volt26
Helper I
2 years agoMatrix visual with calculated columns : add an average column of the shown columns?
Hello! I'm quite new to Power BI and I got almost everything I need from my visual but one thing : an average column of the shown columns. Here is what I have so far : How can I achi...
- Anonymous2 years ago
Hi volt26
Sure, you can try this:
MEASURE = VAR _vtable = SUMMARIZE ( ALLSELECTED ( 'Table' ), 'Table'[ID], 'Table'[Num], "_AVG", [AVG] ) RETURN AVERAGEX ( _vtable, [_AVG] )The result is as follow:
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
2 years agoNot applicable
Hi volt26
Please try this:
Here I create a set of sample for your reference:
Then add a measure:
MEASURE =
VAR _currentID =
SELECTEDVALUE ( 'Table'[ID] )
RETURN
CALCULATE (
SUM ( 'Table'[Values] ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[ID] = _currentID )
)
/ CALCULATE (
DISTINCTCOUNT ( 'Table'[Num] ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[ID] = _currentID )
)
The result is as follow:
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.