Forum Discussion
Anonymous
6 years agoNot applicable
Getting Average of Measure
On one of my line charts, I have measures which contain percentages for all females for a number of groups. When I put the measure on a line graph, it shows the sum of all percentages = 500%, ho...
rajulshah
6 years agoResident Rockstar
Hello Anonymous,
You can use the following DAX:
Average Value = AVERAGEX(SUMMARIZE(Table,Table[Group],"AverageV",[Average Measure]),[AverageV])
Please let me know if this didn't help and provide more details so that I can help you with accurate DAX function.
Anonymous
6 years agoNot applicable
rajulshah Thanks for replying. How would I apply that DAX function to my current measure? This is the code for it:
MALE PRESENT NATIONAL =
CALCULATE(
[Present Percent National],
'All Years Characteristics'[Characteristics] = "MALE"
)
- rajulshah6 years agoResident Rockstar
Anonymous,
So, what I understand is you want to average the value among female and male, right?- Anonymous6 years agoNot applicable
rajulshah Yes, but I have the male and female in measures. When I put them on the line chart, I can't select average. I could only do that if they were columns, but in this case they have to be measures
- rajulshah6 years agoResident Rockstar
So, you can try creating 2 measures for Male and Female.
Male Average = AVERAGEX ( FILTER ( SUMMARIZE ( 'All Years Characteristics', 'All Years Characteristics'[Characteristics], "AverageV", [Present Percent National] ), 'All Years Characteristics'[Characteristics] = "MALE" ), [AverageV] )Female Average = AVERAGEX ( FILTER ( SUMMARIZE ( 'All Years Characteristics', 'All Years Characteristics'[Characteristics], "AverageV", [Present Percent National] ), 'All Years Characteristics'[Characteristics] = "FEMALE" ), [AverageV] )Hope this helps.