Forum Discussion

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi admin11 ,

     

    I think you can try to get correct subtotal by SUMX() based on [_YTD_GPM] measure.

    Measure 7 = SUMX(VALUES('DATE'[YrMth Sort]),[_YTD_GPM])
    PnL CY = SWITCH(SELECTEDVALUE('_PnL_Var'[PnL_Var]),
                                "1_REV", [_YTD_REV_N],
                                "2_COGS",[_YTD_COGS1],
                                "3_OTH", [_YTD_OTH_IN],
                                "4_EXP", [_YTD_EXP2],
                                "5_NET_P",[_YTD_NP_],
                                "6_GPM",[Measure 7],
                                "7_NPM",[_YTD_NPM]
                                )

    Result is as below.

     

    Best Regards,
    Rico Zhou

     

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

    • admin11's avatar
      admin11
      Memorable Member

      Anonymous 

       

      Thank you very much for your response.

       

      i Have found out the issue :-

       

      _YTD_GPM_ = DIVIDE([AMOUNT_REV_N]+[AMOUNT_COGS],[AMOUNT_REV_N])
       
      But i go and use :-
       
      _YTD_GPM = DIVIDE([_YTD_REV_N]+[_YTD_COGS]+[_YTD_OTH_IN],[_YTD_REV_N])
       
      So it cause the problem.
       
      As SUMX usually solve Overtotal problem.
       
      Any way thank you very much.
       
      Paul