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! Request now

Reply
mb0307
Responsive Resident
Responsive Resident

In Matrix table, total is not correct

Hi,

Total in matrix table is not showing correct, as value is shown through measure. How can i achieve this correct result.

 

measure is 

 

SalesNProjectsales=

VAR _Currentmnth =MONTH(DATE(YEAR(TODAY(),MNTH(TODAY(),1)-1)

VAR _AMOUNT =IF(MONTH(MAX(dates[Date]))<=_Currentmnth,

[sales amount],

[avg monthly sales])

return

_amount

 

 

scenario

 

We have sales table , dates table , customer table. To calculate the Project sales we have made summarize table of customer and sales, which give us avg monthly sales.

 

 

 

I want to display a matrix chart showing customer and month on axises and amount. iam using measure to display sales amount which is from jan to aug month and pedicted amount which from sep to dec month. Total is not showing correct

 

Customer JanFebMarAprMayJunJulAugSepOctNovDecTotal
A101044410101010272.2972.2972.2972.29795.1429
B2022220652056202063.2963.2963.2963.29696.1429
C101010781010231023.0023.0023.0023.00253
D30330303030305433.8633.8633.8633.86372.4286
              
total70245504183701068386192.4286192.4286192.4286192.4286

Thanks 

 

 

 

1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hi @mb0307 ,

 

You may create measure like DAX below.

 

Measure_New=

var _table = SUMMARIZE(Table1, Table1[Customer],"_Value", [SalesNProjectsales] )

return
IF(HASONEVALUE(Table1[Customer]), [SalesNProjectsales], SUMX(_table,[_Value]))

 

Best Regards,

Amy 

 

Community Support Team _ Amy

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-xicai
Community Support
Community Support

Hi @mb0307 ,

 

You may create measure like DAX below.

 

Measure_New=

var _table = SUMMARIZE(Table1, Table1[Customer],"_Value", [SalesNProjectsales] )

return
IF(HASONEVALUE(Table1[Customer]), [SalesNProjectsales], SUMX(_table,[_Value]))

 

Best Regards,

Amy 

 

Community Support Team _ Amy

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@mb0307 , Try to change return like

return sumx(values(Table[customer]),_amount)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Greg_Deckler
Community Champion
Community Champion

@mb0307 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



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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