Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
We have a data warehouse that connects via direct query. We have dimension tables that contains ranges of data. For example, dates ranges, income ranges, gender.
The following image contain an example Matrix visulaisation, related to an age of a person. We would like to work the overall average age value?
Selecting, the display value as an average option (the last column), gives an incorrect result.
Using excel I can work out an an average by:
How would I appraoch this within power bi desktop. This the an inbuilt option that can work out an average or would we need to use DAX to create a measure or extra column
Thanks
Perhaps a measure like:
m_MyAverage = ((SUM([AgeRangeLow])+SUM([AgeRangeHigh]/2) * COUNT([Id]))/COUNT([AgeRange])
Hi smoupre,
Your measure was useful. But, I wasn't able to get this to work.
I tried the following measure:
Mid =
VAR
AgeRangeMidPoint = DIVIDE(
(SUM('dim AgeRanges'[Minimum]) + SUM('dim AgeRanges'[Maximum])),2
)
RETURN
(AgeRangeMidPoint * COUNT('fact Calculations'[Id]))Then used it as the last column of the following matrix visualisation:
What I would need to do is to:
Thanks
Hi @Anonymous,
According to your description above, you should be able to use the formula below to get the Sum of the measure value Mid. ![]()
TotalMid =
SUMX (
SUMMARIZE ( 'dim AgeRanges', 'dim AgeRanges'[AgeRange], "abc", [Mid] ),
[abc]
)
Regards
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |