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
annaka05
Helper I
Helper I

Fill blank fields with 0

Hello, 

I have matrix, which is showing last 12 months sales, month by month. I have blank fields there and I want to fill them with 0. Matrix has column with date in format yyyy.mm and sales measure as below:0212.png

I have tried with adding +0 and inserting if loop, but nothing helped.

It works fine, when I have add month column from date hierarchy, but when I am using date column with yyyy.mm format blanks are not filling with 0. I cannot use month column from date hierarchy, because sometimes, when date range, selected in slicer is not in the same year, then I need to sort columns by yyyy.mm (from oldest to newest).

 

Regards,

Anna

2 REPLIES 2
amitchandak
Super User
Super User

@annaka05 , try somthing like this with help from date table

 

0 between range
Measure = var _1= SUM(Opportunity[Opportunity count]) +0
var _min = minx(ALLSELECTED('Calendar'), 'Calendar'[Date])
var _max = maxx(ALLSELECTED('Calendar'), 'Calendar'[Date])
return
CALCULATE(if(max('Calendar'[Date]) <_min || max('Calendar'[Date]) >_max , BLANK(), _1))

 

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

Hello @amitchandak ,

Thank you for your reply. Unfortunatelly, this solution did not fill blanks in my matrix.

 

Anna

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
Top Kudoed Authors