• Sounds like your measure is not additive across time but additive across other dimensions? Would I be correct in making that assumption? If so, you could try changing your aggregation function from "SUM" to "LastNonEmpty" or "LastChild" and remove your nested case statement depending on what you are doing.

    These aggregation functions are usually used for end of period balances or inventory counts. Aggregating along all other dimensions use the SUM function.

    AverageOfChildren is usually used in calculating things like average inventory on hand at the end of a period or average daily balances at the end of a month or other period. Aggregating along all other dimensions use the SUM function.