Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Issue with SUM outside filters

I'm trying to replicate a business calculation that exists in my environment on PowerBI, but I'm not getting what I expect as a result. I have 2 tables that I made as an example and replicate the re...
  • ChenwuZhu_Gmail's avatar
    ChenwuZhu_Gmail
    4 years ago

    Hi Anonymous ,

     

    Is this right?

    FinalValue =
    VAR _s =
        ADDCOLUMNS (
            CROSSJOIN ( VALUES ( 'Calendar'[Month] ), 'Weight' ),
            "final", [Weight] * [NPSCalculated]
        )
    RETURN
        SUMX ( _s, [final] )

     

    Result:

     

    Best Regards

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.