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

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

Reply
learnerdax
Regular Visitor

How to correct Matrix totals (some months has blank values)

Hi Experts,

 

Im trying to correct Totals in Matrix ,Please help me to correct totals.Please check below Snip,im try to do YTD Sales/YTD Qty here im getting 13.33 , But i need 30 Total by Country.I tried below Dax,but its givig blanks for Blank months,it should add up to YTD(Ex Jan -10, Feb -blank,March -30,Then if i select Feb need to get 10 instaed of blank).I can use only Measue(Data set is live)
IF(Hasonevalue(Table(Country),[YTD Sale/YTD QTY Measure],SUMX(Values(Table(Country),[YTD Sale/YTD Qty Measure))

learnerdax_0-1682367432722.png

@tamerj1  Could you please check 

6 REPLIES 6
Greg_Deckler
Community Champion
Community Champion

@learnerdax First, please vote for this idea: https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e

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

Also: https://youtu.be/uXRriTN0cfY
And: https://youtu.be/n4TYhF2ARe8



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...
tamerj1
Super User
Super User

Ajendra
Resolver I
Resolver I

Hello,

I hope you are doing well!

 

Generally YTD Dax we uses with dates.

 

 

In my case it is showing correct, have a look here pls!

 

11111.JPG

Thanks!!

Hi @Ajendra ,Thank you for answering but Im not facing any issue with YTD sales Totals and YTD Qty totals, if i divide YTD Sales/YTD Qty my totals are not corrrect ,because of row context in totals.

FreemanZ
Super User
Super User

hi @learnerdax 

how is [YTD Sale/YTD QTY Measure] defined?

@FreemanZ , Thanks for checking
YTD Sale = TOTALYTD(SUM(Sales),Calendar Date Column)
YTD Qty = TOTALYTD(SUM(Qty),Calendar Date Column)
i tried with sumx in YTD Sales and YTD Qty ,still im facing issue with totals.Please check

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.