Forum Discussion

DQuigg's avatar
DQuigg
Advocate III
6 years ago
Solved

Weighted Average Not Summarizing Properly

I have a table that computes a weighted average of jobs times abilities. It basically computes the average of ability for an individual job. Then it computes an average of jobs by occupation. Finally...
  • DQuigg's avatar
    6 years ago

    Thank you both very much for pointing me at least in the right direction. Through trial and error and using the quick calculation option in Power BI for weighted average, the following DAX formula worked.

     

    Weighted Relevant Ability Score =
    VAR __CATEGORY_VALUES = VALUES('Occupations (SOC Structure)'[ONET Occupation])
    RETURN
                SUMX(
                KEEPFILTERS(__CATEGORY_VALUES),
                CALCULATE(
                    [Individual Occupation Relevant Ability Score]
                        * [Job Postings All Unique % All Selected]
                ))