Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi everyone,
I don't understand the result of the Total row (I expect it was 4)
Here the data:
Anyone help me?
Solved! Go to Solution.
Hi,
I recommend reading this article by SQLBI about the total row: https://www.sqlbi.com/articles/why-power-bi-totals-might-seem-inaccurate/
The behaviour of totals is a bit wonky in Power BI.
For a solution try something like this:
Dax:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
Proud to be a Super User!
hi @hungbm12
Trying to understand how your code works. It shall be executed like this:
measure 3 =
SUMX(
DISTINCT(Sheet1[category]), //1.scans category A then B
CALCULATE( //2.convert row context A(B) to filter context A(B)
SUM( Sheet1[value]), //7. it get 2+2 when scanning A in step 1 and another 2+2 in scanning B, so comes 8
FILTER( // 6. filter context A(B) is replaced by the outcome of FILTER, which is two 24 Dec rows.
Sheet1, //3.scan the original Sheet1
VAR _maxdate = MAX(Sheet1[Date]) // 4. _maxdate equals 24 Dec
RETURN [date]=_maxdate //5. filter in two rows on 24 Dec.
)
)
)
p.s.
[date]=MAX(Sheet1[Date])
is a misleading syntax sugar and thus extended to:
VAR _maxdate = MAX(Sheet1[Date])
RETURN [date]=_maxdate
Hi,
I recommend reading this article by SQLBI about the total row: https://www.sqlbi.com/articles/why-power-bi-totals-might-seem-inaccurate/
The behaviour of totals is a bit wonky in Power BI.
For a solution try something like this:
Dax:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
Proud to be a Super User!
I'm sorry but if I changed the 4th row to December 28th, Total row = 2 (not as I expect). I expect it get the newest value of each Category and return 4
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
19 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
25 | |
10 | |
10 | |
9 | |
6 |