cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nnn123 Frequent Visitor
Frequent Visitor

Aggregating stratified data

Hi,

 

I'm trying to aggregate some survey results in Power BI. The survey respondents were all split into 4 categories/strata and then a weight applied to the separate stratum before calculating weighted results, as in table below (Weighted Result = Result * Weight)

CouncilResultStratumWeightWeighted Result
110110.5105
140212480
160315.2912
12049.5190
21518120
220210.8216
250311550
260413.5810
330113390
330210.5315
350312600
360415.2912

 

I don't want to display the results at strata level in Power BI report though so I would like to be able to calculate the weighted results by strata and then display council level aggregated results only like this:

CouncilWeighted Result
11687
21696
32217

 

In this table above all the 4 separate strata results have been aggregated together for each council. When I try this in a Power BI 'Table' visualisation though it just sums everything (including adding all the weight column together) which is not what i want - the 4 separate weighted results must be calculated individually first in order to produce correct results. Is it possible to produce this simple 2-column table above in a Power BI report?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
jthomson New Contributor
New Contributor

Re: Aggregating stratified data

Make a measure WeightedResult = Calculate(sumx(tablename,tablename[Result]*tablename[weight]))

View solution in original post

1 REPLY 1
Highlighted
jthomson New Contributor
New Contributor

Re: Aggregating stratified data

Make a measure WeightedResult = Calculate(sumx(tablename,tablename[Result]*tablename[weight]))

View solution in original post

Helpful resources

Announcements
New Kudos Received Badges Coming

New Kudos Received Badges Coming

Kudos to you if you earned one of these! Check your inbox for a notification.

Microsoft Implementation for Communities Wins Award

Microsoft Implementation for Communities Wins Award

Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Kudoed Authors (Last 30 Days)
Users online (3,633)