Forum Discussion
Measure Will Not Sum in Table
- 5 years ago
Hi Dalla_Terra ,
This is a common misunderstanding about how tables work in Power BI.
The totals row DOES NOT sum the values in the columns above it, rather it calculates the measure in the column above it WITH NO FILTERS.
Try rewriting your measures something like this:
YTD Sales = CALCULATE( SUM(Depletion[Total Sales]), DATESYTD(Dates[Date], "31/03") //In quotes will be the last day/month of your 'year' ) YTD Goal = CALCULATE( SUM(Goals[Target_Goal]), DATESYTD(Dates[Date], "31/03") ) Goal Achieved = SUMX( Depletion, VAR __achieved = [YTD Sales] / [Goal] RETURN (__achieved > 1) * __achieved )I've kind of done this off the top of my head as I can't see exactly how your model is set up, but the main take-away is that your table totals don't just sum the column values, so you need to use an iterator (SUMX, COUNTX etc.) around your calculation to get the individual results to sum.
Pete
Dalla_Terra This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907