Forum Discussion

WiseFennec's avatar
WiseFennec
Frequent Visitor
3 years ago
Solved

Sumx not working properly.

Hello   I am working on a measure to calculate the gross sales of our products, below my measures : G_TMS_LE = SUMX(F_TMS_Fcst,F_TMS_Fcst[TMS_Prices]*F_TMS_Fcst[TMS_LE]) G_TMS_LE_B = F_TMS_Fcs...
  • WiseFennec's avatar
    WiseFennec
    3 years ago

    Hello

     

    thanks for your answer 

     

    I solved the issue :

     

    the code for the measure TMS_LE] is as below

    TMS_LE = SUM(A_TMS[A_TMS]) + SUM(F_OOR[F_OOR]) + SUM(F_TMS_Fcst[F_TMS_Fcst])

     

    I checked the data for each table and found that the measure G_TMS_LE is not working for the lines where F_TMS_Fcst is null, even though TMS_LE is working 

     G_TMS_LE = SUMX(F_TMS_Fcst,F_TMS_Fcst[TMS_Prices]*F_TMS_Fcst[TMS_LE])

     

    Replacing null by 0 made the trick. I should have known this but I am still a novice 😛