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
User1234567
New Member

Extra Dates appearing in a table when I replace blank values with zeros

I have a table which presents information on temperature alarms on transport shipments. Each month is broken down into three data columns of number of monitors launched, the number of these which alarmed and a metric which is a percentage of monitors alarmed versus launched. The dataset gets built on every month and I currently have data from January to MayPBI Zero Problam .JPG.

 

Obviously if there is a month where where ther we no alarms on a route, the percentage would be dividing by zero, and as such, the % metric returns a blank. to fix this, I wrote a simpe Isblank measure to return a value of zero where this occurs (which is correct because it means all shipments were fine and the Alarm % = zero)

 

However on doing this, the table now presents data for the entire year and displays zeros for these months, despite my source data table only having information from January to May. Before converting the blank values, all my dashboard visuals only show the data from Jan to May and new months appear as the data gets imported into my source file.  I want the months where I have data to display as zeros and the months which do not have any data yet to remain blank and not appear in the table. 

 

Any ideas how to achieve this? I have scoured the web and forums for a solution to this and can't find anything. 

 

 

2 REPLIES 2
User1234567
New Member

I found a solution by firstly creating a calendar table in my data model using power query. and linking the calendar table to my date column in my dataset using the modelling view. 

Then I applied two date filters to the page - firstly to only show data in the current year and secondly to only show data in the previous 12 calendar months. These filters ensure that only data in the current year/month appears in the visuals and each new months data automatically appears during the monthly refresh.

mlsx4
Memorable Member
Memorable Member

I had the same problem sometime ago and I didn't find anything to solve it, so I decided to create a column in my Calendar table and then filter the visual by offset<0

 

Offset = IF(MONTH('CALENDAR'[Date])<MONTH(TODAY()),-1,0) 

 

 

If anyone knows a better solution, it would be very helpful

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