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
Hello there Dalla_Terra ! Unfortunately the Power BI table/matrix sometimes performs poorly when adding the column totals. Try using the Acterys Matrix Visual!
https://appsource.microsoft.com/en-us/product/power-bi-visuals/wa104381371?tab=overview
Hope this answer solves your problem! If you need any additional help please tag me in your reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️ or give it a kudoe 👍
Thanks!
Best regards,
Gonçalo Geraldes