Forum Discussion
Total amount not showing
- 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
Just in case, the dax for 'Cost' is :
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