Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Weighted Average Total Measure

I am working with weighted averages. I have read through the forums and found a lot of helpful answers about calculating the correct value at a row level and aggregate level. See the following posts ...
  • v-cherch-msft's avatar
    v-cherch-msft
    7 years ago

    Hi Anonymous

     

    You may refer to below measure:

    Total of DailyWeightedAvg =
    SUMX (
        SUMMARIZE ( ForumData, ForumData[AsOfDate], "a1", [#DailyWeightedAvg] ),
        [a1]
    )
    #DailyWeightedTotal =
    IF (
        HASONEFILTER ( ForumData[HoldingID] ),
        CALCULATE ( [Total of DailyWeightedAvg], ALL ( ForumData[HoldingID] ) )
    )

    Regards,

    Cherie