Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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%, however I want to get the average = 92%. I can do this with normal column variables, but it doesn't allow me to do it with measure.
Do you know how I can do this with measures?
Hello @powerbi12345,
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.
@powerbi12345,
So, what I understand is you want to average the value among female and male, right?
@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
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.
Thanks rajulshah
But that didn't return the average, it produced the same result as I had before
@powerbi12345, can you please provide sample data and snapshot of what is showed in the table?
rajulshah If I made a calculated column, it would have this code:
I doubt the measure calculation has some issues.
Also, refer
https://geekdecoders.blogspot.com/2019/02/how-to-insert-average-line-in-power-bi.html
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/Winner-Topper-on-Map-How-to-Color-States-on-a-Map-wi...
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p...
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
95 | |
80 | |
77 | |
66 |
User | Count |
---|---|
130 | |
106 | |
105 | |
86 | |
72 |