Forum Discussion

admin11's avatar
admin11
Icon for Memorable Member rankMemorable Member
4 years ago

Why my matrix table return monthly wrong % amount and yet Total column return correct % amount

Hi All

I have a P&L summary table below :-

 

I notice that the Total column return correct value , but the monthly return wrong value . 

 

Remark :-

1. If both return wrong value , it is cause by expression error . 

 

Hope some one can share with me how to trouble shoot this problem ?

 

Value i insert below expression :-

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",[_YTD_GPM],
                            "7_NPM",[_YTD_NPM]
                            )
 
_YTD_GPM = DIVIDE([_YTD_REV_N]+[_YTD_COGS]+[_YTD_OTH_IN],[_YTD_REV_N])
 
_YTD_REV_N =
CALCULATE(
    SUM(GL[AMT])*-1,
    FILTER(
        GL,
        GL[1_REV]="REV"
    )
)
 

Paul

4 Replies

    • admin11's avatar
      admin11
      Icon for Memorable Member rankMemorable Member

      lbendlin 

      You are right , not easy to solve the issue by looking at the expression.

       

      Hope that you can help me find out where go wrong ?

       

      Paul

      • lbendlin's avatar
        lbendlin
        Icon for Super User rankSuper User

        I don't see anything inherently wrong with the data.  ( I see a lot of nested measures which is always a red flag).  Why would you think that the GPM and NPM values are wrong?