Forum Discussion
rgu101
2 years agoHelper I
Group Average in Stacked Column Chart
Hello, I'm trying to create a response distribution of survey results with a stacked column chart by the Question Dimension but not in the traditional sense. My table is similar to this below but...
- Anonymous2 years ago
Hi rgu101 ,
Here are the steps you can follow:
1. Create measure.
Measure = var _countgroup= COUNTX( FILTER(ALL('Table'),'Table'[Question Text]=MAX('Table'[Question Text])&&'Table'[Response]=MAX('Table'[Response])),[Response]) var _count= COUNTX( ALL('Table'),[Response]) var _divide= DIVIDE(_countgroup,_count) return _divideMeasure2 = var _table1= SUMMARIZE( ALL('Table'),'Table'[Question Text],'Table'[Response],"Value",[Measure]) var _sumx= SUMX( FILTER(_table1,[Response]=MAX('Table'[Response])),[Value]) var _count= CALCULATE(DISTINCTCOUNT('Table'[Question Text]),FILTER(ALL('Table'),'Table'[Response]=MAX('Table'[Response]))) return DIVIDE(_sumx,_count)2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
amitchandak
2 years agoSuper User
rgu101 , This is like Avg of Avg
Based on the chosen level
AverageX(Values(Table[Question]), calculate(Divide(Sum(Table[Value1]), Sum(Table[Value2]) )) )
Avg of Sum : https://youtu.be/cN8AO3_vmlY?t=22980