Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Wrong totals in matrix. Need help!

Hi!


I have the following table:

 

Date Total BalanceTotal Balance Last MonthOne Month Change
feb.168,66,71,9
mar.168,28,6-0,4
apr.167,98,2-0,3
mai.1687,90,1
jun.168,780,7
jul.1698,70,3
aug.169,290,2
sep.168,49,2-0,8
okt.168,68,40,2
nov.1688,6-0,6
des.1678-1
jan.176,77-0,3
feb.176,26,7-0,5
mar.176,56,20,3
SUM111WRONG SUM= 111 - WRONG SUM

 

Balance last month is calculated like below because i miss data from all months of January and need to skip it so the balance from December shows up as the last month balance for February.:

 

Total Balance LM =
IF(
   CALCULATE([Total Balance]; DATEADD(Dates[Date];-1;MONTH))=0;
       CALCULATE([Total Balance]; DATEADD(Dates[Date];-2;MONTH));
       CALCULATE([Total Total Balance]; DATEADD(Dates[Date]; -1; MONTH)))

 

Total Balance = SUM(Balance)

 

My problem is that the summarization of the Total Balance Last Month column is wrong in the matrix, and therefore also the One Month Change column.. Making it impossible to show aggregated change within certain periods etc... I have no clue why! (The total is only wrong when i slice the matrix by year/month etc)

 

Could somebody help me sort this out?

 

Thank you!

2 REPLIES 2
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

 

From your description, if I understand your scenario correctly that your problem is the total only shows wrong when you slice the matrix by year/month. I made a test with the data you provided and I cannot reproduce the issue as yours.

 

My test result is below.

 

Capture.PNG

 

If my result is not you want, could you show me your data sample which can reproduce the scenario and your excepted output. You can upload it to OneDrive or Dropbox and post the link here. (Do mask sensitive data before uploading.)

 

In addition, you could refer to my test pbix file.

 

Best Regards,

Cherry

 

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@@v-piga-msf Thank you for the response!

 Hi, i have found the problem now; the problem is that my Date Table runs longer than Mar 17. So there is a "virtual row" below Mar 17 which gets calculated like there is 0 in the Total Balance Column, 6,5 in the Total Balance Last Month Columns and 0 - 6,5 = -6,5 in the One Month Change Column  (ref formulas 1st post)  

 

I have fixed this by makin my date table correnspond to my fact table, but this will be a pain when I update the spreadsheet.

 

@v-piga-msft do you know the relevant DAX to make the summarization stop at the last date in my fact table as opposed to the last date in my date table?

 

Thank you!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors