Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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 May.
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.
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.
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
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.