Forum Discussion

naufal_msr's avatar
naufal_msr
Frequent Visitor
4 years ago
Solved

Total amount not showing

Hi,   I'm trying to figure out why the total for column Cost is not available. Any idea why ?   Thanks !  
  • amitchandak's avatar
    amitchandak
    4 years ago

    naufal_msr ,  try one of the two ways 

     

    Cost = CALCULATE(sumx(values(products[products]), CALCULATE(MIN(products[value_cost_amount]))*CALCULATE(SUM(stocks[onhandQuantity]))),FILTER(outlets,outlets[outlet_code]<>"HQM"))

     

    or

     

    Cost = CALCULATE(sumx(stocks, related(products[value_cost_amount])*stocks[onhandQuantity]),FILTER(outlets,outlets[outlet_code]<>"HQM"))

     

    refer why grand total is wrong - https://www.youtube.com/watch?v=ufHOOLdi_jk